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 059e7d765..ec8e8041f 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 @@ -53,6 +53,8 @@ class CDBStringUpdater : public NLMISC::CSingleton // 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); 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 9f1643e84..9f159fd01 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 @@ -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(); } }; 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 a18e1645a..a76e9656a 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 @@ -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; } }; diff --git a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h index 0f18698c5..f6b79e42d 100644 --- a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h +++ b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h @@ -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(); } }; diff --git a/code/ryzom/server/src/frontend_service/vision_provider.h b/code/ryzom/server/src/frontend_service/vision_provider.h index 39d84fb2f..aaca90869 100644 --- a/code/ryzom/server/src/frontend_service/vision_provider.h +++ b/code/ryzom/server/src/frontend_service/vision_provider.h @@ -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; } }; diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.h b/code/ryzom/server/src/gpm_service/world_position_manager.h index 75ea9ead5..f3a285a2e 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.h +++ b/code/ryzom/server/src/gpm_service/world_position_manager.h @@ -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(); } }; diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index 0f0ab46d5..e6dbb15fc 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -499,7 +499,7 @@ struct CColumnIndexHashMapTraits } bool operator()(const CColumnIndex &left, const CColumnIndex &right) { - return left.hash() < right.hash(); + return left < right; } };