mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-03 16:54:47 +00:00
Fixes for VS2013, ref #236
This commit is contained in:
parent
d05461a837
commit
879f51d9d3
6 changed files with 19 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "stdpch.h"
|
#include "stdpch.h"
|
||||||
|
#include <functional>
|
||||||
#include "fg_prospection_phrase.h"
|
#include "fg_prospection_phrase.h"
|
||||||
#include "nel/misc/common.h"
|
#include "nel/misc/common.h"
|
||||||
#include "nel/misc/fast_floor.h"
|
#include "nel/misc/fast_floor.h"
|
||||||
|
|
|
@ -8028,7 +8028,7 @@ void CCharacter::setStartStatistics( const CCreateCharMsg& createCharMsg )
|
||||||
}
|
}
|
||||||
|
|
||||||
// create character start skills, skill point and money
|
// create character start skills, skill point and money
|
||||||
string s = CreateCharacterStartSkillsValue;
|
string s = CreateCharacterStartSkillsValue.get();
|
||||||
if( s.size() > 0 )
|
if( s.size() > 0 )
|
||||||
{
|
{
|
||||||
CSString skillValue = s;
|
CSString skillValue = s;
|
||||||
|
|
|
@ -48,6 +48,15 @@ class CDBStringUpdater : public NLMISC::CSingleton<CDBStringUpdater>
|
||||||
{
|
{
|
||||||
return ClientDB == other.ClientDB && Node == other.Node;
|
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
|
// 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);
|
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
|
// info for each string leaf
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct CServiceIdHash
|
||||||
{
|
{
|
||||||
enum { bucket_size = 4, min_buckets = 8, };
|
enum { bucket_size = 4, min_buckets = 8, };
|
||||||
size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); }
|
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
|
class CCharIdReplaced
|
||||||
|
|
|
@ -44,7 +44,8 @@ public:
|
||||||
struct CUint32Hash
|
struct CUint32Hash
|
||||||
{
|
{
|
||||||
enum { bucket_size = 4, min_buckets = 8, };
|
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;
|
typedef uint32 TUserId;
|
||||||
|
|
|
@ -785,7 +785,7 @@ NLNET::CMessage& CDbManager::addTask(const std::string& msg, ITaskEventListener*
|
||||||
|
|
||||||
// add listener to task listeners
|
// add listener to task listeners
|
||||||
if (listener != NULL)
|
if (listener != NULL)
|
||||||
_TaskListeners[id] = std::make_pair<ITaskEventListener*, void*>(listener, arg);
|
_TaskListeners[id] = std::pair<ITaskEventListener*, void*>(listener, arg);
|
||||||
|
|
||||||
return *msgrbs;
|
return *msgrbs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue