aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorKingPin <none@none>2008-11-10 06:53:00 -0600
committerKingPin <none@none>2008-11-10 06:53:00 -0600
commit09280b0091474b58d43daf42c0f3d99f86e6ec25 (patch)
treea6b9b17869b7e035811baa36bc1a0e2b618af216 /src/game
parentf2250030cd7ea58eb9de63a96c34656ac1916369 (diff)
[svn] * Switch from hashmap to unordered map. - cleanup source - mangos. Help - Aokromes
--HG-- branch : trunk rename : src/framework/Utilities/HashMap.h => src/framework/Utilities/UnorderedMap.h
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Group.h2
-rw-r--r--src/game/HateMatrix.h2
-rw-r--r--src/game/InstanceSaveMgr.h4
-rw-r--r--src/game/ItemEnchantmentMgr.cpp2
-rw-r--r--src/game/LootMgr.h2
-rw-r--r--src/game/Map.h2
-rw-r--r--src/game/MapInstanced.h2
-rw-r--r--src/game/MapManager.h4
-rw-r--r--src/game/Object.h2
-rw-r--r--src/game/ObjectAccessor.cpp2
-rw-r--r--src/game/ObjectAccessor.h8
-rw-r--r--src/game/ObjectMgr.h58
-rw-r--r--src/game/Pet.h2
-rw-r--r--src/game/Player.h6
-rw-r--r--src/game/SkillDiscovery.cpp2
-rw-r--r--src/game/SpellMgr.h8
-rw-r--r--src/game/WaypointManager.h4
-rw-r--r--src/game/World.h4
18 files changed, 58 insertions, 58 deletions
diff --git a/src/game/Group.h b/src/game/Group.h
index 24546195682..d6c69a857db 100644
--- a/src/game/Group.h
+++ b/src/game/Group.h
@@ -142,7 +142,7 @@ class TRINITY_DLL_SPEC Group
typedef std::list<MemberSlot> MemberSlotList;
typedef MemberSlotList::const_iterator member_citerator;
- typedef HM_NAMESPACE::hash_map< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
+ typedef UNORDERED_MAP< uint32 /*mapId*/, InstanceGroupBind> BoundInstancesMap;
protected:
typedef MemberSlotList::iterator member_witerator;
typedef std::set<uint64> InvitesList;
diff --git a/src/game/HateMatrix.h b/src/game/HateMatrix.h
index 7a21d410362..f4c7d62f5cd 100644
--- a/src/game/HateMatrix.h
+++ b/src/game/HateMatrix.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_HATEMATRIX_H
#define TRINITY_HATEMATRIX_H
-#include "Utilities/HashMap.h"
+#include "Utilities/UnorderedMap.h"
#include <cassert>
class Unit;
diff --git a/src/game/InstanceSaveMgr.h b/src/game/InstanceSaveMgr.h
index cf76ee38781..7dcf13aede8 100644
--- a/src/game/InstanceSaveMgr.h
+++ b/src/game/InstanceSaveMgr.h
@@ -27,7 +27,7 @@
#include "zthread/Mutex.h"
#include <list>
#include <map>
-#include "Utilities/HashMap.h"
+#include "Utilities/UnorderedMap.h"
#include "Database/DatabaseEnv.h"
struct InstanceTemplate;
@@ -121,7 +121,7 @@ class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceS
~InstanceSaveManager();
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;
/* resetTime is a global propery of each (raid/heroic) map
diff --git a/src/game/ItemEnchantmentMgr.cpp b/src/game/ItemEnchantmentMgr.cpp
index 8e87ebb857d..6d4197b0335 100644
--- a/src/game/ItemEnchantmentMgr.cpp
+++ b/src/game/ItemEnchantmentMgr.cpp
@@ -42,7 +42,7 @@ struct EnchStoreItem
};
typedef std::vector<EnchStoreItem> EnchStoreList;
-typedef HM_NAMESPACE::hash_map<uint32, EnchStoreList> EnchantmentStore;
+typedef UNORDERED_MAP<uint32, EnchStoreList> EnchantmentStore;
static EnchantmentStore RandomItemEnch;
diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h
index e18d0380b8c..1cb02c29bfc 100644
--- a/src/game/LootMgr.h
+++ b/src/game/LootMgr.h
@@ -122,7 +122,7 @@ class LootTemplate;
typedef std::vector<QuestItem> QuestItemList;
typedef std::map<uint32, QuestItemList *> QuestItemMap;
typedef std::vector<LootStoreItem> LootStoreItemList;
-typedef HM_NAMESPACE::hash_map<uint32, LootTemplate*> LootTemplateMap;
+typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;
typedef std::set<uint32> LootIdSet;
diff --git a/src/game/Map.h b/src/game/Map.h
index 5e4b408b505..2ded7cf0975 100644
--- a/src/game/Map.h
+++ b/src/game/Map.h
@@ -118,7 +118,7 @@ enum LevelRequirementVsMode
#pragma pack(pop)
#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 INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
diff --git a/src/game/MapInstanced.h b/src/game/MapInstanced.h
index 460bf49f542..44f39facbfe 100644
--- a/src/game/MapInstanced.h
+++ b/src/game/MapInstanced.h
@@ -28,7 +28,7 @@ class TRINITY_DLL_DECL MapInstanced : public Map
{
friend class MapManager;
public:
- typedef HM_NAMESPACE::hash_map< uint32, Map* > InstancedMaps;
+ typedef UNORDERED_MAP< uint32, Map* > InstancedMaps;
MapInstanced(uint32 id, time_t, uint32 aInstanceId);
~MapInstanced() {}
diff --git a/src/game/MapManager.h b/src/game/MapManager.h
index 54b80c70348..44197ccd84a 100644
--- a/src/game/MapManager.h
+++ b/src/game/MapManager.h
@@ -33,8 +33,8 @@ class TRINITY_DLL_DECL MapManager : public Trinity::Singleton<MapManager, Trinit
{
friend class Trinity::OperatorNew<MapManager>;
- typedef HM_NAMESPACE::hash_map<uint32, Map*> MapMapType;
- typedef std::pair<HM_NAMESPACE::hash_map<uint32, Map*>::iterator, bool> MapMapPair;
+ typedef UNORDERED_MAP<uint32, Map*> MapMapType;
+ typedef std::pair<UNORDERED_MAP<uint32, Map*>::iterator, bool> MapMapPair;
public:
diff --git a/src/game/Object.h b/src/game/Object.h
index 943b28b7943..f5dbe92010c 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -94,7 +94,7 @@ class UpdateMask;
class InstanceData;
class GameObject;
-typedef HM_NAMESPACE::hash_map<Player*, UpdateData> UpdateDataMapType;
+typedef UNORDERED_MAP<Player*, UpdateData> UpdateDataMapType;
struct WorldLocation
{
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index c81a6303be6..654645f3068 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -669,7 +669,7 @@ void ObjectAccessor::UpdateVisibilityForPlayer( Player* player )
/// 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;
/// Global defintions for the hashmap storage
diff --git a/src/game/ObjectAccessor.h b/src/game/ObjectAccessor.h
index d7dde01f640..88d459ffa08 100644
--- a/src/game/ObjectAccessor.h
+++ b/src/game/ObjectAccessor.h
@@ -24,7 +24,7 @@
#include "Platform/Define.h"
#include "Policies/Singleton.h"
#include "zthread/FastMutex.h"
-#include "Utilities/HashMap.h"
+#include "Utilities/UnorderedMap.h"
#include "Policies/ThreadingModel.h"
#include "ByteBuffer.h"
@@ -49,7 +49,7 @@ class HashMapHolder
{
public:
- typedef HM_NAMESPACE::hash_map< uint64, T* > MapType;
+ typedef UNORDERED_MAP< uint64, T* > MapType;
typedef ZThread::FastMutex LockType;
typedef Trinity::GeneralLock<LockType > Guard;
@@ -91,8 +91,8 @@ class TRINITY_DLL_DECL ObjectAccessor : public Trinity::Singleton<ObjectAccessor
ObjectAccessor& operator=(const ObjectAccessor &);
public:
- typedef HM_NAMESPACE::hash_map<uint64, Corpse* > Player2CorpsesMapType;
- typedef HM_NAMESPACE::hash_map<Player*, UpdateData>::value_type UpdateDataValueType;
+ typedef UNORDERED_MAP<uint64, Corpse* > Player2CorpsesMapType;
+ typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType;
template<class T> static T* GetObjectInWorld(uint64 guid, T* /*fake*/)
{
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index c40ba87d7f2..a5d8a679fdd 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -74,7 +74,7 @@ struct GameTele
std::wstring wnameLow;
};
-typedef HM_NAMESPACE::hash_map<uint32, GameTele > GameTeleMap;
+typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
typedef std::list<GossipOption> CacheNpcOptionList;
struct ScriptInfo
@@ -123,26 +123,26 @@ struct CellObjectGuids
CellGuidSet gameobjects;
CellCorpseSet corpses;
};
-typedef HM_NAMESPACE::hash_map<uint32/*cell_id*/,CellObjectGuids> CellObjectGuidsMap;
-typedef HM_NAMESPACE::hash_map<uint32/*(mapid,spawnMode) pair*/,CellObjectGuidsMap> MapObjectGuids;
+typedef UNORDERED_MAP<uint32/*cell_id*/,CellObjectGuids> CellObjectGuidsMap;
+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 TrinityStringLocale
{
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
};
-typedef HM_NAMESPACE::hash_map<uint32,CreatureData> CreatureDataMap;
-typedef HM_NAMESPACE::hash_map<uint32,GameObjectData> GameObjectDataMap;
-typedef HM_NAMESPACE::hash_map<uint32,CreatureLocale> CreatureLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,GameObjectLocale> GameObjectLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,ItemLocale> ItemLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,QuestLocale> QuestLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,NpcTextLocale> NpcTextLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,PageTextLocale> PageTextLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,TrinityStringLocale> TrinityStringLocaleMap;
-typedef HM_NAMESPACE::hash_map<uint32,NpcOptionLocale> NpcOptionLocaleMap;
+typedef UNORDERED_MAP<uint32,CreatureData> CreatureDataMap;
+typedef UNORDERED_MAP<uint32,GameObjectData> GameObjectDataMap;
+typedef UNORDERED_MAP<uint32,CreatureLocale> CreatureLocaleMap;
+typedef UNORDERED_MAP<uint32,GameObjectLocale> GameObjectLocaleMap;
+typedef UNORDERED_MAP<uint32,ItemLocale> ItemLocaleMap;
+typedef UNORDERED_MAP<uint32,QuestLocale> QuestLocaleMap;
+typedef UNORDERED_MAP<uint32,NpcTextLocale> NpcTextLocaleMap;
+typedef UNORDERED_MAP<uint32,PageTextLocale> PageTextLocaleMap;
+typedef UNORDERED_MAP<uint32,TrinityStringLocale> TrinityStringLocaleMap;
+typedef UNORDERED_MAP<uint32,NpcOptionLocale> NpcOptionLocaleMap;
typedef std::multimap<uint32,uint32> QuestRelations;
@@ -228,7 +228,7 @@ typedef struct _tagCachePlayerInfo
uint32 unArenaInfoSlot1;
uint32 unArenaInfoSlot2;
}CachePlayerInfo, *PCachePlayerInfo;
-typedef HM_NAMESPACE::hash_map<uint32, PCachePlayerInfo> CachePlayerInfoMap;
+typedef UNORDERED_MAP<uint32, PCachePlayerInfo> CachePlayerInfoMap;
struct PlayerCondition
{
@@ -249,11 +249,11 @@ struct PlayerCondition
};
// NPC gossip text id
-typedef HM_NAMESPACE::hash_map<uint32, uint32> CacheNpcTextIdMap;
+typedef UNORDERED_MAP<uint32, uint32> CacheNpcTextIdMap;
-typedef HM_NAMESPACE::hash_map<uint32, VendorItemData> CacheVendorItemMap;
-typedef HM_NAMESPACE::hash_map<uint32, TrainerSpellData> CacheTrainerSpellMap;
+typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
+typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
enum SkillRangeType
{
@@ -291,23 +291,23 @@ class 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< Guild * > GuildSet;
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(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); }
@@ -803,10 +803,10 @@ class ObjectMgr
QuestMap mQuestTemplates;
- typedef HM_NAMESPACE::hash_map<uint32, GossipText*> GossipTextMap;
- typedef HM_NAMESPACE::hash_map<uint32, uint32> QuestAreaTriggerMap;
- typedef HM_NAMESPACE::hash_map<uint32, uint32> BattleMastersMap;
- typedef HM_NAMESPACE::hash_map<uint32, std::string> ItemTextMap;
+ typedef UNORDERED_MAP<uint32, GossipText*> GossipTextMap;
+ typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerMap;
+ typedef UNORDERED_MAP<uint32, uint32> BattleMastersMap;
+ typedef UNORDERED_MAP<uint32, std::string> ItemTextMap;
typedef std::set<uint32> TavernAreaTriggerSet;
typedef std::set<uint32> GameObjectForQuestSet;
diff --git a/src/game/Pet.h b/src/game/Pet.h
index 32a8b9db6ae..ea13bd5d0dc 100644
--- a/src/game/Pet.h
+++ b/src/game/Pet.h
@@ -115,7 +115,7 @@ enum PetNameInvalidReason
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::vector<uint32> AutoSpellList;
diff --git a/src/game/Player.h b/src/game/Player.h
index 2e8de5e5823..9083f35cda1 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -91,7 +91,7 @@ struct SpellModifier
Spell const* lastAffected;
};
-typedef HM_NAMESPACE::hash_map<uint16, PlayerSpell*> PlayerSpellMap;
+typedef UNORDERED_MAP<uint16, PlayerSpell*> PlayerSpellMap;
typedef std::list<SpellModifier*> SpellModList;
struct SpellCooldown
@@ -1366,7 +1366,7 @@ class TRINITY_DLL_SPEC Player : public Unit
uint8 unReadMails;
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
@@ -2024,7 +2024,7 @@ class TRINITY_DLL_SPEC Player : public Unit
/*** INSTANCE SYSTEM ***/
/*********************************************************/
- typedef HM_NAMESPACE::hash_map< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
+ typedef UNORDERED_MAP< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
void UpdateHomebindTime(uint32 time);
diff --git a/src/game/SkillDiscovery.cpp b/src/game/SkillDiscovery.cpp
index 7167d25883b..2a1c6ec9d82 100644
--- a/src/game/SkillDiscovery.cpp
+++ b/src/game/SkillDiscovery.cpp
@@ -42,7 +42,7 @@ struct SkillDiscoveryEntry
};
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
-typedef HM_NAMESPACE::hash_map<int32, SkillDiscoveryList> SkillDiscoveryMap;
+typedef UNORDERED_MAP<int32, SkillDiscoveryList> SkillDiscoveryMap;
static SkillDiscoveryMap SkillDiscoveryStore;
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 1a13b73194b..6b00240ac74 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -28,7 +28,7 @@
#include "Database/DBCStructure.h"
#include "Database/SQLStorage.h"
-#include "Utilities/HashMap.h"
+#include "Utilities/UnorderedMap.h"
#include <map>
class Player;
@@ -492,7 +492,7 @@ struct SpellProcEventEntry
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_GUARDIAN_MASK 0x2
@@ -531,7 +531,7 @@ struct SpellTargetPosition
float target_Orientation;
};
-typedef HM_NAMESPACE::hash_map<uint32, SpellTargetPosition> SpellTargetPositionMap;
+typedef UNORDERED_MAP<uint32, SpellTargetPosition> SpellTargetPositionMap;
// Spell pet auras
class PetAura
@@ -594,7 +594,7 @@ struct SpellChainNode
uint8 rank;
};
-typedef HM_NAMESPACE::hash_map<uint32, SpellChainNode> SpellChainMap;
+typedef UNORDERED_MAP<uint32, SpellChainNode> SpellChainMap;
typedef std::multimap<uint32, uint32> SpellChainMapNext;
// Spell learning properties (accessed using SpellMgr functions)
diff --git a/src/game/WaypointManager.h b/src/game/WaypointManager.h
index 10d9a4a6fa0..2fdf5622c2e 100644
--- a/src/game/WaypointManager.h
+++ b/src/game/WaypointManager.h
@@ -23,7 +23,7 @@
#include <vector>
#include <string>
-#include "Utilities/HashMap.h"
+#include "Utilities/UnorderedMap.h"
struct WaypointBehavior
{
@@ -82,7 +82,7 @@ class WaypointManager
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);
void _clearPath(WaypointPath &path);
- typedef HM_NAMESPACE::hash_map<uint32, WaypointPath> WaypointPathMap;
+ typedef UNORDERED_MAP<uint32, WaypointPath> WaypointPathMap;
WaypointPathMap m_pathMap;
};
diff --git a/src/game/World.h b/src/game/World.h
index a42aa13d69f..b42a4d61394 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -504,9 +504,9 @@ class World
uint32 mail_timer;
uint32 mail_timer_expires;
- typedef HM_NAMESPACE::hash_map<uint32, Weather*> WeatherMap;
+ typedef UNORDERED_MAP<uint32, Weather*> WeatherMap;
WeatherMap m_weathers;
- typedef HM_NAMESPACE::hash_map<uint32, WorldSession*> SessionMap;
+ typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap;
SessionMap m_sessions;
std::set<WorldSession*> m_kicked_sessions;
uint32 m_maxActiveSessionCount;