mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Visual Studio 2013 compilation support for Ryzom Server
--HG-- branch : develop
This commit is contained in:
parent
aede54925f
commit
883d699428
7 changed files with 17 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -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(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -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; }
|
||||
};
|
||||
|
||||
|
|
|
@ -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(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -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; }
|
||||
};
|
||||
|
||||
|
|
|
@ -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(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -499,7 +499,7 @@ struct CColumnIndexHashMapTraits
|
|||
}
|
||||
bool operator()(const CColumnIndex &left, const CColumnIndex &right)
|
||||
{
|
||||
return left.hash() < right.hash();
|
||||
return left < right;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue