Fixes for VS2013, ref #236

This commit is contained in:
kaetemi 2015-03-29 16:58:07 +02:00
parent d05461a837
commit 879f51d9d3
6 changed files with 19 additions and 3 deletions

View file

@ -17,6 +17,7 @@
#include "stdpch.h"
#include <functional>
#include "fg_prospection_phrase.h"
#include "nel/misc/common.h"
#include "nel/misc/fast_floor.h"

View file

@ -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;

View file

@ -48,6 +48,15 @@ class CDBStringUpdater : public NLMISC::CSingleton<CDBStringUpdater>
{
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<CDBStringUpdater>
{
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

View file

@ -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

View file

@ -45,6 +45,7 @@ public:
{
enum { bucket_size = 4, min_buckets = 8, };
size_t operator () (const uint32 &i) const { return i; }
bool operator()(const uint32 left, const uint32 right) const { return left < right; }
};
typedef uint32 TUserId;

View file

@ -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<ITaskEventListener*, void*>(listener, arg);
_TaskListeners[id] = std::pair<ITaskEventListener*, void*>(listener, arg);
return *msgrbs;
}