Visual Studio 2013 compilation support for Ryzom Server

This commit is contained in:
kaetemi 2015-02-23 12:48:41 +01:00
parent 1cf671509e
commit 0b3e58a563
7 changed files with 17 additions and 9 deletions

View file

@ -53,6 +53,8 @@ class CDBStringUpdater : public NLMISC::CSingleton<CDBStringUpdater>
// hasher for the identifier
struct THashDBStringLeaf
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator()(const TBDStringLeaf &stringLeaf) const
{
return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4);

View file

@ -48,9 +48,10 @@ namespace NLNET
extern CGenericXmlMsgHeaderManager GenericMsgManager;
class CServiceIdHash
struct CServiceIdHash
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); }
};

View file

@ -41,9 +41,10 @@ public:
};
class CUint32Hash
struct CUint32Hash
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator () ( const uint32 &i ) const { return i; }
};

View file

@ -89,9 +89,10 @@ public:
private:
class CHash
struct CHash
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); }
};

View file

@ -84,6 +84,8 @@ class CClientIdLookup;
// Hash function: ClientId * 256 + CeId
struct CHash
{
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator() ( TPairClientSlot pair ) const { return (pair.ClientId << 8) + pair.Slot; }
};

View file

@ -137,9 +137,10 @@ public:
//friend void CWorldEntity::createPrimitive(NLPACS::UMoveContainer *pMoveContainer, uint8 worldImage);
friend void CWorldEntity::removePrimitive();
class CEntityIdHash
struct CEntityIdHash
{
public:
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); }
};

View file

@ -499,7 +499,7 @@ struct CColumnIndexHashMapTraits
}
bool operator()(const CColumnIndex &left, const CColumnIndex &right)
{
return left.hash() < right.hash();
return left < right;
}
};