diff --git a/code/ryzom/common/src/game_share/season.cpp b/code/ryzom/common/src/game_share/season.cpp index 0d8729802..5ab27d85a 100644 --- a/code/ryzom/common/src/game_share/season.cpp +++ b/code/ryzom/common/src/game_share/season.cpp @@ -21,7 +21,7 @@ namespace EGSPD { -static const struct { char* Name; CSeason::TSeason Value; } TSeasonConvert[] = +static const struct { const char* Name; CSeason::TSeason Value; } TSeasonConvert[] = { { "Spring", CSeason::Spring }, { "Summer", CSeason::Summer }, diff --git a/code/ryzom/server/src/ai_share/16x16_layer.h b/code/ryzom/server/src/ai_share/16x16_layer.h index 5e1926cf7..0cc3b86cc 100644 --- a/code/ryzom/server/src/ai_share/16x16_layer.h +++ b/code/ryzom/server/src/ai_share/16x16_layer.h @@ -227,7 +227,7 @@ protected: uint getIndex(sint value) { int i; - for (i=0; i<4 && Values[i]!=value; ++i); + for (i=0; i<4 && Values[i]!=value; ++i) ; return i&3; } }; diff --git a/code/ryzom/server/src/ai_share/ai_types.h b/code/ryzom/server/src/ai_share/ai_types.h index baa39115e..802fe5ba6 100644 --- a/code/ryzom/server/src/ai_share/ai_types.h +++ b/code/ryzom/server/src/ai_share/ai_types.h @@ -51,7 +51,7 @@ namespace AITYPES { public: CDescTypeEntry(char *name, T value) : _name(name), _value(value) {} - char *_name; + const char *_name; T _value; }; static CDescTypeEntry _entries[]; diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 0e88e1ac3..497990b05 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -3261,7 +3261,7 @@ static void parsePrimOutpost(const IPrimitive *prim, const std::string &mapName, CAIActions::exec("OUTPOST", aliasNode, continent, filename, familyName); // 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]); for (size_t i=0; i!=nprops; ++i) { diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp index e9bdad546..31be06fae 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp @@ -54,7 +54,7 @@ NL_INSTANCE_COUNTER_IMPL(CPlayer); bool wipeAndRestore(const std::string &fileName); FILE *LastLoad = NULL; -char *LastLoadFileName = "last_loaded_char.bin"; +const char *LastLoadFileName = "last_loaded_char.bin"; extern CVariable MonkeyLoadEnable; extern uint32 CharacterSaveCounter; diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.h b/code/ryzom/server/src/server_share/mysql_wrapper.h index 93115ff55..e78e9d169 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.h +++ b/code/ryzom/server/src/server_share/mysql_wrapper.h @@ -131,7 +131,7 @@ namespace MSW nlassert(_CurrentRow != NULL); nlassert(fieldIndex < getNumFields()); - static char *emptyString = ""; + static const char *emptyString = ""; char *ret = _CurrentRow[fieldIndex]; diff --git a/code/ryzom/tools/pd_parser/cpp_output.h b/code/ryzom/tools/pd_parser/cpp_output.h index 50b3f23c0..fd1a2aa2d 100644 --- a/code/ryzom/tools/pd_parser/cpp_output.h +++ b/code/ryzom/tools/pd_parser/cpp_output.h @@ -623,7 +623,7 @@ inline void CCppOutput::clear() inline bool searchForId(char* buffer, char** start, char** end) { - char* id = "$Id:"; + const char* id = "$Id:"; uint len = strlen(id); for (; *buffer != '\0'; ++buffer) { diff --git a/code/ryzom/tools/pd_parser/templatizer.cpp b/code/ryzom/tools/pd_parser/templatizer.cpp index 0d66e0af6..7c7119ea1 100644 --- a/code/ryzom/tools/pd_parser/templatizer.cpp +++ b/code/ryzom/tools/pd_parser/templatizer.cpp @@ -40,7 +40,7 @@ enum TTemplatizerToken Unknown }; -struct { TTemplatizerToken Token; char* Text; } SimpleTokens[] = +struct { TTemplatizerToken Token; const char* Text; } SimpleTokens[] = { { BlocStart, "{" }, { BlocEnd, "}" }, diff --git a/code/ryzom/tools/pd_parser/templatizer.h b/code/ryzom/tools/pd_parser/templatizer.h index c0ee6830b..7e0d3a765 100644 --- a/code/ryzom/tools/pd_parser/templatizer.h +++ b/code/ryzom/tools/pd_parser/templatizer.h @@ -648,7 +648,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "ref" }; + static const char* args[] = { "name", "ref" }; return (const char**)args; } @@ -685,7 +685,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "ref" }; + static const char* args[] = { "name", "ref" }; return (const char**)args; } @@ -815,7 +815,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -845,7 +845,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -875,7 +875,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "evalinsub" }; + static const char* args[] = { "name", "evalinsub" }; return (const char**)args; } }; @@ -903,7 +903,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -931,7 +931,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -959,7 +959,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -987,7 +987,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "value" }; + static const char* args[] = { "value" }; return (const char**)args; } }; @@ -1020,7 +1020,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1045,7 +1045,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1078,7 +1078,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1105,7 +1105,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1136,7 +1136,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "cond" }; + static const char* args[] = { "cond" }; return (const char**)args; } }; @@ -1165,7 +1165,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "cond" }; + static const char* args[] = { "cond" }; return (const char**)args; } }; @@ -1201,7 +1201,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "separator" }; + static const char* args[] = { "separator" }; return (const char**)args; } }; @@ -1279,7 +1279,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1319,7 +1319,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "class", "name" }; + static const char* args[] = { "class", "name" }; return (const char**)args; } @@ -1344,7 +1344,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; diff --git a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp index 4f3fe6a23..949d35f10 100644 --- a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp @@ -375,7 +375,7 @@ int extractNewSheetNames(int argc, char *argv[]) // **** Parse all the different type of sheets - char *sheetDefs[]= + const char *sheetDefs[]= { // 1st is the name of the worksheet file. // 2nd is the Key column identifier.