From 84f9d648728b7e1cb3c662e55b70f97d8d60550a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 16:58:07 +0200 Subject: [PATCH] Fixes for VS2013, ref #236 --- .../phrase_manager/fg_prospection_phrase.cpp | 1 + .../player_manager/character.cpp | 2 +- .../player_manager/db_string_updater.h | 13 +++++++++++++ .../player_manager/player_manager.h | 1 + .../player_manager/player_manager_interface.h | 3 ++- .../src/persistant_data_service/db_manager.cpp | 2 +- 6 files changed, 19 insertions(+), 3 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp index f2fc03eb0..7721bad0c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp @@ -17,6 +17,7 @@ #include "stdpch.h" +#include #include "fg_prospection_phrase.h" #include "nel/misc/common.h" #include "nel/misc/fast_floor.h" diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 3c72995ea..b5cb58a07 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -8028,7 +8028,7 @@ void CCharacter::setStartStatistics( const CCreateCharMsg& createCharMsg ) } // create character start skills, skill point and money - string s = CreateCharacterStartSkillsValue; + string s = CreateCharacterStartSkillsValue.get(); if( s.size() > 0 ) { CSString skillValue = s; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h index 7603c92e9..e9296b0ef 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h @@ -48,6 +48,15 @@ class CDBStringUpdater : public NLMISC::CSingleton { return ClientDB == other.ClientDB && Node == other.Node; } + + bool operator <(const TBDStringLeaf &other) const + { + if (ClientDB != other.ClientDB) + return ClientDB < other.ClientDB; + if (Node != other.Node) + return Node < other.Node; + return false; + } }; // hasher for the identifier @@ -58,6 +67,10 @@ class CDBStringUpdater : public NLMISC::CSingleton { return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4); } + bool operator()(const TBDStringLeaf &left, const TBDStringLeaf &right) const + { + return left < right; + } }; // info for each string leaf diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h index ba0d1c306..5e68af4d2 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h @@ -52,6 +52,7 @@ struct CServiceIdHash { enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); } + bool operator()(const NLNET::TServiceId &left, const NLNET::TServiceId &right) const { return left < right; } }; class CCharIdReplaced diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h index 3e5de3130..2ebf3d50e 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h @@ -44,7 +44,8 @@ public: struct CUint32Hash { enum { bucket_size = 4, min_buckets = 8, }; - size_t operator () ( const uint32 &i ) const { return i; } + size_t operator () (const uint32 &i) const { return i; } + bool operator()(const uint32 left, const uint32 right) const { return left < right; } }; typedef uint32 TUserId; diff --git a/code/ryzom/server/src/persistant_data_service/db_manager.cpp b/code/ryzom/server/src/persistant_data_service/db_manager.cpp index 6acdf687c..1f853a729 100644 --- a/code/ryzom/server/src/persistant_data_service/db_manager.cpp +++ b/code/ryzom/server/src/persistant_data_service/db_manager.cpp @@ -785,7 +785,7 @@ NLNET::CMessage& CDbManager::addTask(const std::string& msg, ITaskEventListener* // add listener to task listeners if (listener != NULL) - _TaskListeners[id] = std::make_pair(listener, arg); + _TaskListeners[id] = std::pair(listener, arg); return *msgrbs; }