mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Use (if available) TR1 unordered_map instead hash_map at Unix/Linux (in GCC 4.0.0 and later) and Windows (VC90 and later)
This commit is contained in:
parent
ac222e92b1
commit
5222f49820
25 changed files with 80 additions and 73 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
#define MANGOS_OBJECTREGISTRY_H
|
#define MANGOS_OBJECTREGISTRY_H
|
||||||
|
|
||||||
#include "Platform/Define.h"
|
#include "Platform/Define.h"
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include "Policies/Singleton.h"
|
#include "Policies/Singleton.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,6 @@ EXTRA_DIST = \
|
||||||
Utilities/ByteConverter.h \
|
Utilities/ByteConverter.h \
|
||||||
Utilities/Callback.h \
|
Utilities/Callback.h \
|
||||||
Utilities/EventProcessor.h \
|
Utilities/EventProcessor.h \
|
||||||
Utilities/HashMap.h \
|
Utilities/UnorderedMap.h \
|
||||||
Utilities/LinkedList.h \
|
Utilities/LinkedList.h \
|
||||||
Utilities/TypeList.h
|
Utilities/TypeList.h
|
||||||
|
|
|
||||||
|
|
@ -16,32 +16,39 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MANGOS_HASHMAP_H
|
#ifndef MANGOS_UNORDERED_MAP_H
|
||||||
#define MANGOS_HASHMAP_H
|
#define MANGOS_UNORDERED_MAP_H
|
||||||
|
|
||||||
#include "Platform/CompilerDefs.h"
|
#include "Platform/CompilerDefs.h"
|
||||||
#include "Platform/Define.h"
|
#include "Platform/Define.h"
|
||||||
|
|
||||||
#if COMPILER == COMPILER_INTEL
|
#if COMPILER == COMPILER_INTEL
|
||||||
#include <ext/hash_map>
|
#include <ext/hash_map>
|
||||||
|
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 4
|
||||||
|
#include <tr1/unordered_map>
|
||||||
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
|
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
|
||||||
#include <ext/hash_map>
|
#include <ext/hash_map>
|
||||||
|
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 // VC9.0 and later
|
||||||
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
#include <hash_map>
|
#include <hash_map>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _STLPORT_VERSION
|
#ifdef _STLPORT_VERSION
|
||||||
#define HM_NAMESPACE std
|
#define UNORDERED_MAP std::hash_map
|
||||||
using std::hash_map;
|
using std::hash_map;
|
||||||
|
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500
|
||||||
|
#define UNORDERED_MAP std::tr1::unordered_map
|
||||||
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
|
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
|
||||||
#define HM_NAMESPACE stdext
|
#define UNORDERED_MAP stdext::hash_map
|
||||||
using stdext::hash_map;
|
using stdext::hash_map;
|
||||||
#elif COMPILER == COMPILER_INTEL
|
#elif COMPILER == COMPILER_INTEL
|
||||||
#define HM_NAMESPACE std
|
#define UNORDERED_MAP std::hash_map
|
||||||
using std::hash_map;
|
using std::hash_map;
|
||||||
|
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 4
|
||||||
|
#define UNORDERED_MAP std::tr1::unordered_map
|
||||||
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
|
#elif COMPILER == COMPILER_GNU && __GNUC__ >= 3
|
||||||
#define HM_NAMESPACE __gnu_cxx
|
#define UNORDERED_MAP std::__gnu_cxx::hash_map
|
||||||
using __gnu_cxx::hash_map;
|
|
||||||
|
|
||||||
namespace __gnu_cxx
|
namespace __gnu_cxx
|
||||||
{
|
{
|
||||||
|
|
@ -57,7 +64,7 @@ namespace __gnu_cxx
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define HM_NAMESPACE std
|
#define UNORDERED_MAP std::hash_map
|
||||||
using std::hash_map;
|
using std::hash_map;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -140,7 +140,7 @@ class MANGOS_DLL_SPEC Group
|
||||||
typedef std::list<MemberSlot> MemberSlotList;
|
typedef std::list<MemberSlot> MemberSlotList;
|
||||||
typedef MemberSlotList::const_iterator member_citerator;
|
typedef MemberSlotList::const_iterator member_citerator;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
|
typedef UNORDERED_MAP< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
|
||||||
protected:
|
protected:
|
||||||
typedef MemberSlotList::iterator member_witerator;
|
typedef MemberSlotList::iterator member_witerator;
|
||||||
typedef std::set<uint64> InvitesList;
|
typedef std::set<uint64> InvitesList;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include "zthread/Mutex.h"
|
#include "zthread/Mutex.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include "Database/DatabaseEnv.h"
|
#include "Database/DatabaseEnv.h"
|
||||||
|
|
||||||
struct InstanceTemplate;
|
struct InstanceTemplate;
|
||||||
|
|
@ -118,7 +118,7 @@ class MANGOS_DLL_DECL InstanceSaveManager : public MaNGOS::Singleton<InstanceSav
|
||||||
~InstanceSaveManager();
|
~InstanceSaveManager();
|
||||||
|
|
||||||
typedef std::map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveMap;
|
typedef std::map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
|
typedef UNORDERED_MAP<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
|
||||||
typedef std::map<uint32 /*mapId*/, InstanceSaveMap> InstanceSaveMapMap;
|
typedef std::map<uint32 /*mapId*/, InstanceSaveMap> InstanceSaveMapMap;
|
||||||
|
|
||||||
/* resetTime is a global propery of each (raid/heroic) map
|
/* resetTime is a global propery of each (raid/heroic) map
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ struct EnchStoreItem
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<EnchStoreItem> EnchStoreList;
|
typedef std::vector<EnchStoreItem> EnchStoreList;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, EnchStoreList> EnchantmentStore;
|
typedef UNORDERED_MAP<uint32, EnchStoreList> EnchantmentStore;
|
||||||
|
|
||||||
static EnchantmentStore RandomItemEnch;
|
static EnchantmentStore RandomItemEnch;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ class LootTemplate;
|
||||||
typedef std::vector<QuestItem> QuestItemList;
|
typedef std::vector<QuestItem> QuestItemList;
|
||||||
typedef std::map<uint32, QuestItemList *> QuestItemMap;
|
typedef std::map<uint32, QuestItemList *> QuestItemMap;
|
||||||
typedef std::vector<LootStoreItem> LootStoreItemList;
|
typedef std::vector<LootStoreItem> LootStoreItemList;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, LootTemplate*> LootTemplateMap;
|
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;
|
||||||
|
|
||||||
typedef std::set<uint32> LootIdSet;
|
typedef std::set<uint32> LootIdSet;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ enum LevelRequirementVsMode
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<Creature*, CreatureMover> CreatureMoveList;
|
typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
|
||||||
|
|
||||||
#define MAX_HEIGHT 100000.0f // can be use for find ground height at surface
|
#define MAX_HEIGHT 100000.0f // can be use for find ground height at surface
|
||||||
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
|
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class MANGOS_DLL_DECL MapInstanced : public Map
|
||||||
{
|
{
|
||||||
friend class MapManager;
|
friend class MapManager;
|
||||||
public:
|
public:
|
||||||
typedef HM_NAMESPACE::hash_map< uint32, Map* > InstancedMaps;
|
typedef UNORDERED_MAP< uint32, Map* > InstancedMaps;
|
||||||
|
|
||||||
MapInstanced(uint32 id, time_t expiry);
|
MapInstanced(uint32 id, time_t expiry);
|
||||||
~MapInstanced() {}
|
~MapInstanced() {}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
||||||
{
|
{
|
||||||
|
|
||||||
friend class MaNGOS::OperatorNew<MapManager>;
|
friend class MaNGOS::OperatorNew<MapManager>;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, Map*> MapMapType;
|
typedef UNORDERED_MAP<uint32, Map*> MapMapType;
|
||||||
typedef std::pair<HM_NAMESPACE::hash_map<uint32, Map*>::iterator, bool> MapMapPair;
|
typedef std::pair<UNORDERED_MAP<uint32, Map*>::iterator, bool> MapMapPair;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class Map;
|
||||||
class UpdateMask;
|
class UpdateMask;
|
||||||
class InstanceData;
|
class InstanceData;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<Player*, UpdateData> UpdateDataMapType;
|
typedef UNORDERED_MAP<Player*, UpdateData> UpdateDataMapType;
|
||||||
|
|
||||||
struct WorldLocation
|
struct WorldLocation
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -628,7 +628,7 @@ void ObjectAccessor::UpdateVisibilityForPlayer( Player* player )
|
||||||
|
|
||||||
/// Define the static member of HashMapHolder
|
/// Define the static member of HashMapHolder
|
||||||
|
|
||||||
template <class T> HM_NAMESPACE::hash_map< uint64, T* > HashMapHolder<T>::m_objectMap;
|
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap;
|
||||||
template <class T> ZThread::FastMutex HashMapHolder<T>::i_lock;
|
template <class T> ZThread::FastMutex HashMapHolder<T>::i_lock;
|
||||||
|
|
||||||
/// Global defintions for the hashmap storage
|
/// Global defintions for the hashmap storage
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include "Platform/Define.h"
|
#include "Platform/Define.h"
|
||||||
#include "Policies/Singleton.h"
|
#include "Policies/Singleton.h"
|
||||||
#include "zthread/FastMutex.h"
|
#include "zthread/FastMutex.h"
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include "Policies/ThreadingModel.h"
|
#include "Policies/ThreadingModel.h"
|
||||||
|
|
||||||
#include "ByteBuffer.h"
|
#include "ByteBuffer.h"
|
||||||
|
|
@ -47,7 +47,7 @@ class HashMapHolder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map< uint64, T* > MapType;
|
typedef UNORDERED_MAP< uint64, T* > MapType;
|
||||||
typedef ZThread::FastMutex LockType;
|
typedef ZThread::FastMutex LockType;
|
||||||
typedef MaNGOS::GeneralLock<LockType > Guard;
|
typedef MaNGOS::GeneralLock<LockType > Guard;
|
||||||
|
|
||||||
|
|
@ -89,8 +89,8 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
|
||||||
ObjectAccessor& operator=(const ObjectAccessor &);
|
ObjectAccessor& operator=(const ObjectAccessor &);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef HM_NAMESPACE::hash_map<uint64, Corpse* > Player2CorpsesMapType;
|
typedef UNORDERED_MAP<uint64, Corpse* > Player2CorpsesMapType;
|
||||||
typedef HM_NAMESPACE::hash_map<Player*, UpdateData>::value_type UpdateDataValueType;
|
typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType;
|
||||||
|
|
||||||
template<class T> static T* GetObjectInWorld(uint64 guid, T* /*fake*/)
|
template<class T> static T* GetObjectInWorld(uint64 guid, T* /*fake*/)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ struct GameTele
|
||||||
std::wstring wnameLow;
|
std::wstring wnameLow;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, GameTele > GameTeleMap;
|
typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
|
||||||
|
|
||||||
struct ScriptInfo
|
struct ScriptInfo
|
||||||
{
|
{
|
||||||
|
|
@ -120,26 +120,26 @@ struct CellObjectGuids
|
||||||
CellGuidSet gameobjects;
|
CellGuidSet gameobjects;
|
||||||
CellCorpseSet corpses;
|
CellCorpseSet corpses;
|
||||||
};
|
};
|
||||||
typedef HM_NAMESPACE::hash_map<uint32/*cell_id*/,CellObjectGuids> CellObjectGuidsMap;
|
typedef UNORDERED_MAP<uint32/*cell_id*/,CellObjectGuids> CellObjectGuidsMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32/*(mapid,spawnMode) pair*/,CellObjectGuidsMap> MapObjectGuids;
|
typedef UNORDERED_MAP<uint32/*(mapid,spawnMode) pair*/,CellObjectGuidsMap> MapObjectGuids;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
|
typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
|
||||||
|
|
||||||
struct MangosStringLocale
|
struct MangosStringLocale
|
||||||
{
|
{
|
||||||
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
|
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,CreatureData> CreatureDataMap;
|
typedef UNORDERED_MAP<uint32,CreatureData> CreatureDataMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,GameObjectData> GameObjectDataMap;
|
typedef UNORDERED_MAP<uint32,GameObjectData> GameObjectDataMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,CreatureLocale> CreatureLocaleMap;
|
typedef UNORDERED_MAP<uint32,CreatureLocale> CreatureLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,GameObjectLocale> GameObjectLocaleMap;
|
typedef UNORDERED_MAP<uint32,GameObjectLocale> GameObjectLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,ItemLocale> ItemLocaleMap;
|
typedef UNORDERED_MAP<uint32,ItemLocale> ItemLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,QuestLocale> QuestLocaleMap;
|
typedef UNORDERED_MAP<uint32,QuestLocale> QuestLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,NpcTextLocale> NpcTextLocaleMap;
|
typedef UNORDERED_MAP<uint32,NpcTextLocale> NpcTextLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,PageTextLocale> PageTextLocaleMap;
|
typedef UNORDERED_MAP<uint32,PageTextLocale> PageTextLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,MangosStringLocale> MangosStringLocaleMap;
|
typedef UNORDERED_MAP<uint32,MangosStringLocale> MangosStringLocaleMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32,NpcOptionLocale> NpcOptionLocaleMap;
|
typedef UNORDERED_MAP<uint32,NpcOptionLocale> NpcOptionLocaleMap;
|
||||||
|
|
||||||
typedef std::multimap<uint32,uint32> QuestRelations;
|
typedef std::multimap<uint32,uint32> QuestRelations;
|
||||||
|
|
||||||
|
|
@ -229,11 +229,11 @@ struct PlayerCondition
|
||||||
};
|
};
|
||||||
|
|
||||||
// NPC gossip text id
|
// NPC gossip text id
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, uint32> CacheNpcTextIdMap;
|
typedef UNORDERED_MAP<uint32, uint32> CacheNpcTextIdMap;
|
||||||
typedef std::list<GossipOption> CacheNpcOptionList;
|
typedef std::list<GossipOption> CacheNpcOptionList;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, VendorItemData> CacheVendorItemMap;
|
typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, TrainerSpellData> CacheTrainerSpellMap;
|
typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
|
||||||
|
|
||||||
enum SkillRangeType
|
enum SkillRangeType
|
||||||
{
|
{
|
||||||
|
|
@ -271,23 +271,23 @@ class ObjectMgr
|
||||||
ObjectMgr();
|
ObjectMgr();
|
||||||
~ObjectMgr();
|
~ObjectMgr();
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, Item*> ItemMap;
|
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||||
|
|
||||||
typedef std::set< Group * > GroupSet;
|
typedef std::set< Group * > GroupSet;
|
||||||
typedef std::set< Guild * > GuildSet;
|
typedef std::set< Guild * > GuildSet;
|
||||||
typedef std::set< ArenaTeam * > ArenaTeamSet;
|
typedef std::set< ArenaTeam * > ArenaTeamSet;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, Quest*> QuestMap;
|
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, AreaTrigger> AreaTriggerMap;
|
typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerMap;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, std::string> AreaTriggerScriptMap;
|
typedef UNORDERED_MAP<uint32, std::string> AreaTriggerScriptMap;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, ReputationOnKillEntry> RepOnKillMap;
|
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, WeatherZoneChances> WeatherZoneMap;
|
typedef UNORDERED_MAP<uint32, WeatherZoneChances> WeatherZoneMap;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, PetCreateSpellEntry> PetCreateSpellMap;
|
typedef UNORDERED_MAP<uint32, PetCreateSpellEntry> PetCreateSpellMap;
|
||||||
|
|
||||||
Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);}
|
Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);}
|
||||||
Player* GetPlayer(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); }
|
Player* GetPlayer(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); }
|
||||||
|
|
@ -775,10 +775,10 @@ class ObjectMgr
|
||||||
|
|
||||||
QuestMap mQuestTemplates;
|
QuestMap mQuestTemplates;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, GossipText*> GossipTextMap;
|
typedef UNORDERED_MAP<uint32, GossipText*> GossipTextMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, uint32> QuestAreaTriggerMap;
|
typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, uint32> BattleMastersMap;
|
typedef UNORDERED_MAP<uint32, uint32> BattleMastersMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, std::string> ItemTextMap;
|
typedef UNORDERED_MAP<uint32, std::string> ItemTextMap;
|
||||||
typedef std::set<uint32> TavernAreaTriggerSet;
|
typedef std::set<uint32> TavernAreaTriggerSet;
|
||||||
typedef std::set<uint32> GameObjectForQuestSet;
|
typedef std::set<uint32> GameObjectForQuestSet;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ enum PetNameInvalidReason
|
||||||
PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
|
PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint16, PetSpell*> PetSpellMap;
|
typedef UNORDERED_MAP<uint16, PetSpell*> PetSpellMap;
|
||||||
typedef std::map<uint32,uint32> TeachSpellMap;
|
typedef std::map<uint32,uint32> TeachSpellMap;
|
||||||
typedef std::vector<uint32> AutoSpellList;
|
typedef std::vector<uint32> AutoSpellList;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ struct SpellModifier
|
||||||
Spell const* lastAffected;
|
Spell const* lastAffected;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint16, PlayerSpell*> PlayerSpellMap;
|
typedef UNORDERED_MAP<uint16, PlayerSpell*> PlayerSpellMap;
|
||||||
typedef std::list<SpellModifier*> SpellModList;
|
typedef std::list<SpellModifier*> SpellModList;
|
||||||
|
|
||||||
struct SpellCooldown
|
struct SpellCooldown
|
||||||
|
|
@ -1359,7 +1359,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
uint8 unReadMails;
|
uint8 unReadMails;
|
||||||
time_t m_nextMailDelivereTime;
|
time_t m_nextMailDelivereTime;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, Item*> ItemMap;
|
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
|
||||||
|
|
||||||
ItemMap mMitems; //template defined in objectmgr.cpp
|
ItemMap mMitems; //template defined in objectmgr.cpp
|
||||||
|
|
||||||
|
|
@ -1986,7 +1986,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
/*** INSTANCE SYSTEM ***/
|
/*** INSTANCE SYSTEM ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
|
typedef UNORDERED_MAP< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
|
||||||
|
|
||||||
void UpdateHomebindTime(uint32 time);
|
void UpdateHomebindTime(uint32 time);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ struct SkillDiscoveryEntry
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
|
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
|
||||||
typedef HM_NAMESPACE::hash_map<int32, SkillDiscoveryList> SkillDiscoveryMap;
|
typedef UNORDERED_MAP<int32, SkillDiscoveryList> SkillDiscoveryMap;
|
||||||
|
|
||||||
static SkillDiscoveryMap SkillDiscoveryStore;
|
static SkillDiscoveryMap SkillDiscoveryStore;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#include "Database/DBCStructure.h"
|
#include "Database/DBCStructure.h"
|
||||||
#include "Database/SQLStorage.h"
|
#include "Database/SQLStorage.h"
|
||||||
|
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class Player;
|
class Player;
|
||||||
|
|
@ -488,7 +488,7 @@ struct SpellProcEventEntry
|
||||||
uint32 cooldown; // hidden cooldown used for some spell proc events, applied to _triggered_spell_
|
uint32 cooldown; // hidden cooldown used for some spell proc events, applied to _triggered_spell_
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, SpellProcEventEntry> SpellProcEventMap;
|
typedef UNORDERED_MAP<uint32, SpellProcEventEntry> SpellProcEventMap;
|
||||||
|
|
||||||
#define ELIXIR_BATTLE_MASK 0x1
|
#define ELIXIR_BATTLE_MASK 0x1
|
||||||
#define ELIXIR_GUARDIAN_MASK 0x2
|
#define ELIXIR_GUARDIAN_MASK 0x2
|
||||||
|
|
@ -527,7 +527,7 @@ struct SpellTargetPosition
|
||||||
float target_Orientation;
|
float target_Orientation;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, SpellTargetPosition> SpellTargetPositionMap;
|
typedef UNORDERED_MAP<uint32, SpellTargetPosition> SpellTargetPositionMap;
|
||||||
|
|
||||||
// Spell pet auras
|
// Spell pet auras
|
||||||
class PetAura
|
class PetAura
|
||||||
|
|
@ -590,7 +590,7 @@ struct SpellChainNode
|
||||||
uint8 rank;
|
uint8 rank;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, SpellChainNode> SpellChainMap;
|
typedef UNORDERED_MAP<uint32, SpellChainNode> SpellChainMap;
|
||||||
typedef std::multimap<uint32, uint32> SpellChainMapNext;
|
typedef std::multimap<uint32, uint32> SpellChainMapNext;
|
||||||
|
|
||||||
// Spell learning properties (accessed using SpellMgr functions)
|
// Spell learning properties (accessed using SpellMgr functions)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
|
|
||||||
struct WaypointBehavior
|
struct WaypointBehavior
|
||||||
{
|
{
|
||||||
|
|
@ -80,7 +80,7 @@ class WaypointManager
|
||||||
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);
|
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);
|
||||||
void _clearPath(WaypointPath &path);
|
void _clearPath(WaypointPath &path);
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, WaypointPath> WaypointPathMap;
|
typedef UNORDERED_MAP<uint32, WaypointPath> WaypointPathMap;
|
||||||
WaypointPathMap m_pathMap;
|
WaypointPathMap m_pathMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -473,9 +473,9 @@ class World
|
||||||
uint32 mail_timer;
|
uint32 mail_timer;
|
||||||
uint32 mail_timer_expires;
|
uint32 mail_timer_expires;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, Weather*> WeatherMap;
|
typedef UNORDERED_MAP<uint32, Weather*> WeatherMap;
|
||||||
WeatherMap m_weathers;
|
WeatherMap m_weathers;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, WorldSession*> SessionMap;
|
typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap;
|
||||||
SessionMap m_sessions;
|
SessionMap m_sessions;
|
||||||
std::set<WorldSession*> m_kicked_sessions;
|
std::set<WorldSession*> m_kicked_sessions;
|
||||||
uint32 m_maxActiveSessionCount;
|
uint32 m_maxActiveSessionCount;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
// must be the first thing to include for it to work
|
// must be the first thing to include for it to work
|
||||||
#include "MemoryLeaks.h"
|
#include "MemoryLeaks.h"
|
||||||
|
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,15 @@
|
||||||
|
|
||||||
#include "zthread/Thread.h"
|
#include "zthread/Thread.h"
|
||||||
#include "../src/zthread/ThreadImpl.h"
|
#include "../src/zthread/ThreadImpl.h"
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/UnorderedMap.h"
|
||||||
#include "Database/SqlDelayThread.h"
|
#include "Database/SqlDelayThread.h"
|
||||||
|
|
||||||
class SqlTransaction;
|
class SqlTransaction;
|
||||||
class SqlResultQueue;
|
class SqlResultQueue;
|
||||||
class SqlQueryHolder;
|
class SqlQueryHolder;
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<ZThread::ThreadImpl*, SqlTransaction*> TransactionQueues;
|
typedef UNORDERED_MAP<ZThread::ThreadImpl*, SqlTransaction*> TransactionQueues;
|
||||||
typedef HM_NAMESPACE::hash_map<ZThread::ThreadImpl*, SqlResultQueue*> QueryQueues;
|
typedef UNORDERED_MAP<ZThread::ThreadImpl*, SqlResultQueue*> QueryQueues;
|
||||||
|
|
||||||
#define MAX_QUERY_LEN 1024
|
#define MAX_QUERY_LEN 1024
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@
|
||||||
RelativePath="..\..\src\framework\Utilities\EventProcessor.h">
|
RelativePath="..\..\src\framework\Utilities\EventProcessor.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\framework\Utilities\HashMap.h">
|
RelativePath="..\..\src\framework\Utilities\UnorderedMap.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\framework\Utilities\LinkedList.h">
|
RelativePath="..\..\src\framework\Utilities\LinkedList.h">
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\framework\Utilities\HashMap.h"
|
RelativePath="..\..\src\framework\Utilities\UnorderedMap.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\framework\Utilities\HashMap.h"
|
RelativePath="..\..\src\framework\Utilities\UnorderedMap.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue