From 08386e0c289c093743dfde622be31c5f47967348 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 30 Oct 2010 14:20:26 +0200 Subject: [PATCH] Changed: #825 Remove all warning when compiling Ryzom --- code/ryzom/client/src/character_cl.cpp | 3 +++ code/ryzom/client/src/entities.cpp | 3 ++- code/ryzom/client/src/entity_cl.cpp | 2 +- code/ryzom/client/src/init.cpp | 3 --- code/ryzom/client/src/interface_v3/interface_manager.cpp | 5 ++--- code/ryzom/client/src/landscape_poly_drawer.cpp | 9 ++++----- code/ryzom/client/src/login_patch.cpp | 9 +++++---- code/ryzom/client/src/user_entity.cpp | 2 +- .../common/src/game_share/server_edition_module.cpp | 6 +++--- code/ryzom/server/src/ai_service/script_vm.h | 6 ++++-- code/ryzom/server/src/ai_service/stdpch.h | 1 + .../player_manager/cdb_synchronised.cpp | 3 ++- .../tools/leveldesign/world_editor/land_export/main.cpp | 2 +- code/ryzom/tools/stats_scan/user_char_filters.cpp | 2 +- 14 files changed, 30 insertions(+), 26 deletions(-) diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index e74539f74..8edc071c9 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -366,6 +366,9 @@ CCharacterCL::CCharacterCL() _PvpEnemies[i] = false; } + _ClanCivMaxFame = PVP_CLAN::None; + _ClanCultMaxFame = PVP_CLAN::None; + _OutpostId = 0; _OutpostSide = OUTPOSTENUMS::UnknownPVPSide; diff --git a/code/ryzom/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index b1af0a092..fcf5d3f08 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -1575,6 +1575,7 @@ void CEntityManager::updateVisualProperty(const NLMISC::TGameCycle &gameCycle, c string propName = toString("SERVER:Entities:E%d:P%d", slot, prop); TProperty propty; propty.GC = gameCycle; + propty.Value = 0; // propty.Value = IngameDbMngr.getProp(propName); @@ -1849,7 +1850,7 @@ CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensi uint i; const uint count = (uint)_Entities.size(); - uint selectedEntityId; + uint selectedEntityId = 0; float selectedEntityDist = FLT_MAX; // No selected Entity for (i=0; i(pTokenSubjectEntity); if (pC) { EGSPD::CPeople::TPeople race = pC->people(); @@ -6542,7 +6541,7 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr) GSGENDER::EGender gender = GSGENDER::neutral; if (pTokenSubjectEntity->isUser() || pTokenSubjectEntity->isPlayer() || pTokenSubjectEntity->isNPC()) { - CCharacterCL *pC = (CCharacterCL*)(pTokenSubjectEntity); + CCharacterCL *pC = dynamic_cast(pTokenSubjectEntity); if (pC) { gender = pC->getGender(); diff --git a/code/ryzom/client/src/landscape_poly_drawer.cpp b/code/ryzom/client/src/landscape_poly_drawer.cpp index 5ec749eca..f4dd53a70 100644 --- a/code/ryzom/client/src/landscape_poly_drawer.cpp +++ b/code/ryzom/client/src/landscape_poly_drawer.cpp @@ -609,12 +609,11 @@ void CLandscapePolyDrawer::computeBBoxFromPolygon(const NLMISC::CPolygon2D &poly } // search for min and max dimensions of polygon on x and y axes. - CVector2f rectMax, rectMin; - for(uint i=0; ischeduleStartSession(body); bool trialAllowed = false; bool nevraxScenario = false; - std::string missionTag = ""; + std::string missionTag; /*Informs EGS that the animation has started*/ if ( getLinkedSessionId(body.SessionId) == TSessionId(0) && session->getSessionType() == RSMGR::TSessionType::st_anim ) diff --git a/code/ryzom/server/src/ai_service/script_vm.h b/code/ryzom/server/src/ai_service/script_vm.h index 6fc8a01f1..a1ffcd64a 100644 --- a/code/ryzom/server/src/ai_service/script_vm.h +++ b/code/ryzom/server/src/ai_service/script_vm.h @@ -20,6 +20,8 @@ #include "nel/misc/smart_ptr.h" //#include "ai_grp.h" +#include + namespace AIVM { @@ -71,7 +73,7 @@ public: class CByteCodeEntry { public: CByteCodeEntry() - : _Index(~0) + : _Index(std::numeric_limits::max()) { } CByteCodeEntry(NLMISC::CSmartPtr code, size_t index) @@ -81,7 +83,7 @@ public: } bool isValid()const { - return _Index!=~0; + return _Index != std::numeric_limits::max(); } NLMISC::CSmartPtr& code() { return _Code; } size_t& index() { return _Index; } diff --git a/code/ryzom/server/src/ai_service/stdpch.h b/code/ryzom/server/src/ai_service/stdpch.h index ae82daa14..c2f2190e4 100644 --- a/code/ryzom/server/src/ai_service/stdpch.h +++ b/code/ryzom/server/src/ai_service/stdpch.h @@ -50,6 +50,7 @@ #include #include #include +#include //---------------------------------------------------------------- diff --git a/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp b/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp index cd6693a72..7c7be7fa4 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp @@ -146,7 +146,8 @@ void CCDBSynchronised::read( const string& fileName ) // value token = strtok(buffer," \t"); if( token == NULL ) continue; - sint64 value = atoi(token); + sint64 value; + NLMISC::fromString(token, value); // property name token = strtok(NULL," \n"); diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp index d3e107d17..83c93f311 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp @@ -106,7 +106,7 @@ struct SOptions : public SExportOptions string getStr (const string &var) { - string ret = ""; + string ret; try { CConfigFile::CVar &cvString = cf.getVar (var); diff --git a/code/ryzom/tools/stats_scan/user_char_filters.cpp b/code/ryzom/tools/stats_scan/user_char_filters.cpp index ee8e458a2..98b269900 100644 --- a/code/ryzom/tools/stats_scan/user_char_filters.cpp +++ b/code/ryzom/tools/stats_scan/user_char_filters.cpp @@ -41,7 +41,7 @@ FILTER(Money," []") CSString s0= s.firstWord(true); CSString s1= s.firstWord(true); uint32 min= s0.atoi(); - uint32 max= (s1.empty()? ~0u: s1.atoi()); + uint32 max= (s1.empty()? std::numeric_limits::max(): s1.atoi()); if ( (min==0 && s0!="0") || (max==0 && s1!="0") || !s.strip().empty() ) { nlwarning("Bad arguments in filter: should be []");