Changed: char* into const char*. string_constant_to_char.patch provided by vhelsing

This commit is contained in:
vl 2010-05-17 12:24:49 +02:00
parent 4723178982
commit 8779c9a177
10 changed files with 28 additions and 28 deletions

View file

@ -21,7 +21,7 @@
namespace EGSPD namespace EGSPD
{ {
static const struct { char* Name; CSeason::TSeason Value; } TSeasonConvert[] = static const struct { const char* Name; CSeason::TSeason Value; } TSeasonConvert[] =
{ {
{ "Spring", CSeason::Spring }, { "Spring", CSeason::Spring },
{ "Summer", CSeason::Summer }, { "Summer", CSeason::Summer },

View file

@ -51,7 +51,7 @@ namespace AITYPES
{ {
public: public:
CDescTypeEntry(char *name, T value) : _name(name), _value(value) {} CDescTypeEntry(char *name, T value) : _name(name), _value(value) {}
char *_name; const char *_name;
T _value; T _value;
}; };
static CDescTypeEntry _entries[]; static CDescTypeEntry _entries[];

View file

@ -3261,7 +3261,7 @@ static void parsePrimOutpost(const IPrimitive *prim, const std::string &mapName,
CAIActions::exec("OUTPOST", aliasNode, continent, filename, familyName); CAIActions::exec("OUTPOST", aliasNode, continent, filename, familyName);
// link squads // link squads
char* props[] = { "tribe_squads", "tribe_squads2", "default_squads", "buyable_squads" }; const char* props[] = { "tribe_squads", "tribe_squads2", "default_squads", "buyable_squads" };
size_t nprops = sizeof(props)/sizeof(props[0]); size_t nprops = sizeof(props)/sizeof(props[0]);
for (size_t i=0; i!=nprops; ++i) for (size_t i=0; i!=nprops; ++i)
{ {

View file

@ -54,7 +54,7 @@ NL_INSTANCE_COUNTER_IMPL(CPlayer);
bool wipeAndRestore(const std::string &fileName); bool wipeAndRestore(const std::string &fileName);
FILE *LastLoad = NULL; FILE *LastLoad = NULL;
char *LastLoadFileName = "last_loaded_char.bin"; const char *LastLoadFileName = "last_loaded_char.bin";
extern CVariable<uint32> MonkeyLoadEnable; extern CVariable<uint32> MonkeyLoadEnable;
extern uint32 CharacterSaveCounter; extern uint32 CharacterSaveCounter;

View file

@ -131,7 +131,7 @@ namespace MSW
nlassert(_CurrentRow != NULL); nlassert(_CurrentRow != NULL);
nlassert(fieldIndex < getNumFields()); nlassert(fieldIndex < getNumFields());
static char *emptyString = ""; static const char *emptyString = "";
char *ret = _CurrentRow[fieldIndex]; char *ret = _CurrentRow[fieldIndex];

View file

@ -623,7 +623,7 @@ inline void CCppOutput::clear()
inline bool searchForId(char* buffer, char** start, char** end) inline bool searchForId(char* buffer, char** start, char** end)
{ {
char* id = "$Id:"; const char* id = "$Id:";
uint len = strlen(id); uint len = strlen(id);
for (; *buffer != '\0'; ++buffer) for (; *buffer != '\0'; ++buffer)
{ {

View file

@ -40,7 +40,7 @@ enum TTemplatizerToken
Unknown Unknown
}; };
struct { TTemplatizerToken Token; char* Text; } SimpleTokens[] = struct { TTemplatizerToken Token; const char* Text; } SimpleTokens[] =
{ {
{ BlocStart, "{" }, { BlocStart, "{" },
{ BlocEnd, "}" }, { BlocEnd, "}" },

View file

@ -648,7 +648,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name", "ref" }; static const char* args[] = { "name", "ref" };
return (const char**)args; return (const char**)args;
} }
@ -685,7 +685,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name", "ref" }; static const char* args[] = { "name", "ref" };
return (const char**)args; return (const char**)args;
} }
@ -815,7 +815,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -845,7 +845,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -875,7 +875,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name", "evalinsub" }; static const char* args[] = { "name", "evalinsub" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -903,7 +903,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -931,7 +931,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -959,7 +959,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -987,7 +987,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "value" }; static const char* args[] = { "value" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1020,7 +1020,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1045,7 +1045,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1078,7 +1078,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1105,7 +1105,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1136,7 +1136,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "cond" }; static const char* args[] = { "cond" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1165,7 +1165,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "cond" }; static const char* args[] = { "cond" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1201,7 +1201,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "separator" }; static const char* args[] = { "separator" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1279,7 +1279,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };
@ -1319,7 +1319,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "class", "name" }; static const char* args[] = { "class", "name" };
return (const char**)args; return (const char**)args;
} }
@ -1344,7 +1344,7 @@ public:
/// Get Param list /// Get Param list
virtual const char** getDefParamList() virtual const char** getDefParamList()
{ {
static char* args[] = { "name" }; static const char* args[] = { "name" };
return (const char**)args; return (const char**)args;
} }
}; };

View file

@ -375,7 +375,7 @@ int extractNewSheetNames(int argc, char *argv[])
// **** Parse all the different type of sheets // **** Parse all the different type of sheets
char *sheetDefs[]= const char *sheetDefs[]=
{ {
// 1st is the name of the worksheet file. // 1st is the name of the worksheet file.
// 2nd is the Key column identifier. // 2nd is the Key column identifier.