Refactor(Core/Misc): Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros (#1627)

* Delete macros UNORDERED_MAP
* Delete macros UNORDERED_SET
This commit is contained in:
Kargatum
2019-03-26 00:01:56 +07:00
committed by GitHub
parent d1abe39414
commit 824a80005c
57 changed files with 175 additions and 408 deletions
@@ -8,11 +8,11 @@
#define _MMAP_FACTORY_H #define _MMAP_FACTORY_H
#include "MMapManager.h" #include "MMapManager.h"
#include "UnorderedMap.h"
#include "DetourAlloc.h" #include "DetourAlloc.h"
#include "DetourNavMesh.h" #include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h" #include "DetourNavMeshQuery.h"
#include "Map.h" #include "Map.h"
#include <unordered_map>
namespace MMAP namespace MMAP
{ {
@@ -7,11 +7,11 @@
#ifndef _MMAP_MANAGER_H #ifndef _MMAP_MANAGER_H
#define _MMAP_MANAGER_H #define _MMAP_MANAGER_H
#include "UnorderedMap.h"
#include "DetourAlloc.h" #include "DetourAlloc.h"
#include "DetourNavMesh.h" #include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h" #include "DetourNavMeshQuery.h"
#include "World.h" #include "World.h"
#include <unordered_map>
// memory management // memory management
inline void* dtCustomAlloc(size_t size, dtAllocHint /*hint*/) inline void* dtCustomAlloc(size_t size, dtAllocHint /*hint*/)
@@ -27,8 +27,8 @@ inline void dtCustomFree(void* ptr)
// move map related classes // move map related classes
namespace MMAP namespace MMAP
{ {
typedef UNORDERED_MAP<uint32, dtTileRef> MMapTileSet; typedef std::unordered_map<uint32, dtTileRef> MMapTileSet;
typedef UNORDERED_MAP<uint32, dtNavMeshQuery*> NavMeshQuerySet; typedef std::unordered_map<uint32, dtNavMeshQuery*> NavMeshQuerySet;
// dummy struct to hold map's mmap data // dummy struct to hold map's mmap data
struct MMapData struct MMapData
@@ -51,7 +51,7 @@ namespace MMAP
}; };
typedef UNORDERED_MAP<uint32, MMapData*> MMapDataSet; typedef std::unordered_map<uint32, MMapData*> MMapDataSet;
// singleton class // singleton class
// holds all all access to mmap loading unloading and meshes // holds all all access to mmap loading unloading and meshes
@@ -19,9 +19,9 @@
#define _VMAPMANAGER2_H #define _VMAPMANAGER2_H
#include "IVMapManager.h" #include "IVMapManager.h"
#include "Dynamic/UnorderedMap.h"
#include "Define.h" #include "Define.h"
#include <ace/Thread_Mutex.h> #include <ace/Thread_Mutex.h>
#include <unordered_map>
//=========================================================== //===========================================================
@@ -62,8 +62,8 @@ namespace VMAP
int iRefCount; int iRefCount;
}; };
typedef UNORDERED_MAP<uint32, StaticMapTree*> InstanceTreeMap; typedef std::unordered_map<uint32, StaticMapTree*> InstanceTreeMap;
typedef UNORDERED_MAP<std::string, ManagedModel> ModelFileMap; typedef std::unordered_map<std::string, ManagedModel> ModelFileMap;
class VMapManager2 : public IVMapManager class VMapManager2 : public IVMapManager
{ {
+3 -3
View File
@@ -8,8 +8,8 @@
#define _MAPTREE_H #define _MAPTREE_H
#include "Define.h" #include "Define.h"
#include "Dynamic/UnorderedMap.h"
#include "BoundingIntervalHierarchy.h" #include "BoundingIntervalHierarchy.h"
#include <unordered_map>
namespace VMAP namespace VMAP
{ {
@@ -27,8 +27,8 @@ namespace VMAP
class StaticMapTree class StaticMapTree
{ {
typedef UNORDERED_MAP<uint32, bool> loadedTileMap; typedef std::unordered_map<uint32, bool> loadedTileMap;
typedef UNORDERED_MAP<uint32, uint32> loadedSpawnMap; typedef std::unordered_map<uint32, uint32> loadedSpawnMap;
private: private:
uint32 iMapID; uint32 iMapID;
bool iIsTiled; bool iIsTiled;
@@ -31,7 +31,7 @@ struct GameobjectModelData
std::string name; std::string name;
}; };
typedef UNORDERED_MAP<uint32, GameobjectModelData> ModelList; typedef std::unordered_map<uint32, GameobjectModelData> ModelList;
ModelList model_list; ModelList model_list;
void LoadGameObjectModelList() void LoadGameObjectModelList()
+2 -2
View File
@@ -49,8 +49,8 @@
#include "Define.h" #include "Define.h"
#include "Dynamic/UnorderedMap.h" #include <unordered_map>
#include "Dynamic/UnorderedSet.h" #include <unordered_set>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
-8
View File
@@ -43,12 +43,4 @@
# error "FATAL ERROR: Unknown compiler." # error "FATAL ERROR: Unknown compiler."
#endif #endif
#if defined(__cplusplus) && __cplusplus == 201103L
# define COMPILER_HAS_CPP11_SUPPORT 1
#elif _MSC_VER >= 1700
# define COMPILER_HAS_CPP11_SUPPORT 1
#else
# define COMPILER_HAS_CPP11_SUPPORT 0
#endif
#endif #endif
-107
View File
@@ -1,107 +0,0 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_HASH_NAMESPACE_H
#define TRINITY_HASH_NAMESPACE_H
#include "Define.h"
#if COMPILER_HAS_CPP11_SUPPORT
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#elif defined(_STLPORT_VERSION)
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
# define HASH_NAMESPACE_START namespace std { namespace tr1 {
# define HASH_NAMESPACE_END } }
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
# define HASH_NAMESPACE_START namespace stdext {
# define HASH_NAMESPACE_END }
#if !_HAS_TRADITIONAL_STL
#ifndef HASH_NAMESPACE
#define HASH_NAMESPACE
#else
// can be not used by some platforms, so provide fake forward
HASH_NAMESPACE_START
template<class K>
class hash
{
public:
size_t operator() (K const&);
};
HASH_NAMESPACE_END
#endif
#endif
#elif COMPILER == COMPILER_INTEL
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
# define HASH_NAMESPACE_START namespace std { namespace tr1 {
# define HASH_NAMESPACE_END } }
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
# define HASH_NAMESPACE_START namespace __gnu_cxx {
# define HASH_NAMESPACE_END }
#include <ext/hash_fun.h>
#include <string>
HASH_NAMESPACE_START
template<>
class hash<unsigned long long>
{
public:
size_t operator()(const unsigned long long &__x) const { return (size_t)__x; }
};
template<typename T>
class hash<T *>
{
public:
size_t operator()(T * const &__x) const { return (size_t)__x; }
};
template<> struct hash<std::string>
{
size_t operator()(const std::string &__x) const
{
return hash<char const*>()(__x.c_str());
}
};
HASH_NAMESPACE_END
#else
# define HASH_NAMESPACE_START namespace std {
# define HASH_NAMESPACE_END }
#endif
#if COMPILER != COMPILER_MICROSOFT
// Visual Studio use non standard hash calculation function, so provide fake forward for other
HASH_NAMESPACE_START
template<class K>
size_t hash_value(K const&);
HASH_NAMESPACE_END
#endif
#endif
+1 -2
View File
@@ -8,12 +8,11 @@
#define TRINITY_OBJECTREGISTRY_H #define TRINITY_OBJECTREGISTRY_H
#include "Define.h" #include "Define.h"
#include "Dynamic/UnorderedMap.h"
#include <ace/Singleton.h> #include <ace/Singleton.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
#include <unordered_map>
/** ObjectRegistry holds all registry item of the same type /** ObjectRegistry holds all registry item of the same type
*/ */
-60
View File
@@ -1,60 +0,0 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_UNORDERED_MAP_H
#define TRINITY_UNORDERED_MAP_H
#include "HashNamespace.h"
#if COMPILER_HAS_CPP11_SUPPORT
# include <unordered_map>
#elif COMPILER == COMPILER_INTEL
# include <ext/hash_map>
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
# include <unordered_map>
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
# include <tr1/unordered_map>
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
# include <ext/hash_map>
#elif COMPILER == COMPILER_MICROSOFT && ((_MSC_VER >= 1500 && _HAS_TR1) || _MSC_VER >= 1700) // VC9.0 SP1 and later
# include <unordered_map>
#else
# include <hash_map>
#endif
#ifdef _STLPORT_VERSION
# define UNORDERED_MAP std::hash_map
# define UNORDERED_MULTIMAP std::hash_multimap
#elif COMPILER_HAS_CPP11_SUPPORT
# define UNORDERED_MAP std::unordered_map
# define UNORDERED_MULTIMAP std::unordered_multimap
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
# define UNORDERED_MAP std::tr1::unordered_map
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
# define UNORDERED_MAP std::tr1::unordered_map
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
# define UNORDERED_MAP stdext::hash_map
# define UNORDERED_MULTIMAP stdext::hash_multimap
#elif COMPILER == COMPILER_INTEL
# define UNORDERED_MAP std::hash_map
# define UNORDERED_MULTIMAP std::hash_multimap
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
# define UNORDERED_MAP std::unordered_map
# define UNORDERED_MULTIMAP std::unordered_multimap
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
# define UNORDERED_MAP std::tr1::unordered_map
# define UNORDERED_MULTIMAP std::tr1::unordered_multimap
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
# define UNORDERED_MAP __gnu_cxx::hash_map
# define UNORDERED_MULTIMAP __gnu_cxx::hash_multimap
#else
# define UNORDERED_MAP std::hash_map
# define UNORDERED_MULTIMAP std::hash_multimap
#endif
#endif
-54
View File
@@ -1,54 +0,0 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_UNORDERED_SET_H
#define TRINITY_UNORDERED_SET_H
#include "HashNamespace.h"
#if COMPILER_HAS_CPP11_SUPPORT
# include <unordered_set>
#elif COMPILER == COMPILER_INTEL
# include <ext/hash_set>
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
# include <unordered_set>
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
# include <tr1/unordered_set>
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
# include <ext/hash_set>
#elif COMPILER == COMPILER_MICROSOFT && ((_MSC_VER >= 1500 && _HAS_TR1) || _MSC_VER >= 1700) // VC9.0 SP1 and later
# include <unordered_set>
#else
# include <hash_set>
#endif
#ifdef _STLPORT_VERSION
# define UNORDERED_SET std::hash_set
using std::hash_set;
#elif COMPILER_HAS_CPP11_SUPPORT
# define UNORDERED_SET std::unordered_set
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1600 // VS100
# define UNORDERED_SET std::tr1::unordered_set
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1500 && _HAS_TR1
# define UNORDERED_SET std::tr1::unordered_set
#elif COMPILER == COMPILER_MICROSOFT && _MSC_VER >= 1300
# define UNORDERED_SET stdext::hash_set
using stdext::hash_set;
#elif COMPILER == COMPILER_INTEL
# define UNORDERED_SET std::hash_set
using std::hash_set;
#elif COMPILER == COMPILER_GNU && defined(__clang__) && defined(_LIBCPP_VERSION)
# define UNORDERED_SET std::unordered_set
#elif COMPILER == COMPILER_GNU && GCC_VERSION > 40200
# define UNORDERED_SET std::tr1::unordered_set
#elif COMPILER == COMPILER_GNU && GCC_VERSION >= 30000
# define UNORDERED_SET __gnu_cxx::hash_set
#else
# define UNORDERED_SET std::hash_set
using std::hash_set;
#endif
#endif
@@ -218,7 +218,7 @@ class SmartScript
void SetScript9(SmartScriptHolder& e, uint32 entry); void SetScript9(SmartScriptHolder& e, uint32 entry);
Unit* GetLastInvoker(Unit* invoker = NULL); Unit* GetLastInvoker(Unit* invoker = NULL);
uint64 mLastInvoker; uint64 mLastInvoker;
typedef UNORDERED_MAP<uint32, uint32> CounterMap; typedef std::unordered_map<uint32, uint32> CounterMap;
CounterMap mCounterList; CounterMap mCounterList;
// Xinef: Fix Combat Movement // Xinef: Fix Combat Movement
@@ -271,7 +271,7 @@ class SmartScript
SmartScriptType mScriptType; SmartScriptType mScriptType;
uint32 mEventPhase; uint32 mEventPhase;
UNORDERED_MAP<int32, int32> mStoredDecimals; std::unordered_map<int32, int32> mStoredDecimals;
uint32 mPathId; uint32 mPathId;
SmartAIEventStoredList mStoredEvents; SmartAIEventStoredList mStoredEvents;
std::list<uint32> mRemIDs; std::list<uint32> mRemIDs;
@@ -24,7 +24,7 @@ void SmartWaypointMgr::LoadFromDB()
{ {
uint32 oldMSTime = getMSTime(); uint32 oldMSTime = getMSTime();
for (UNORDERED_MAP<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr) for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
{ {
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr) for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
delete pathItr->second; delete pathItr->second;
@@ -83,7 +83,7 @@ void SmartWaypointMgr::LoadFromDB()
SmartWaypointMgr::~SmartWaypointMgr() SmartWaypointMgr::~SmartWaypointMgr()
{ {
for (UNORDERED_MAP<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr) for (std::unordered_map<uint32, WPPath*>::iterator itr = waypoint_map.begin(); itr != waypoint_map.end(); ++itr)
{ {
for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr) for (WPPath::iterator pathItr = itr->second->begin(); pathItr != itr->second->end(); ++pathItr)
delete pathItr->second; delete pathItr->second;
@@ -1564,7 +1564,7 @@ struct SmartScriptHolder
}; };
typedef UNORDERED_MAP<uint32, WayPoint*> WPPath; typedef std::unordered_map<uint32, WayPoint*> WPPath;
typedef std::list<WorldObject*> ObjectList; typedef std::list<WorldObject*> ObjectList;
typedef std::list<uint64> GuidList; typedef std::list<uint64> GuidList;
@@ -1618,7 +1618,7 @@ public:
delete m_guidList; delete m_guidList;
} }
}; };
typedef UNORDERED_MAP<uint32, ObjectGuidList*> ObjectListMap; typedef std::unordered_map<uint32, ObjectGuidList*> ObjectListMap;
class SmartWaypointMgr class SmartWaypointMgr
{ {
@@ -1637,7 +1637,7 @@ class SmartWaypointMgr
} }
private: private:
UNORDERED_MAP<uint32, WPPath*> waypoint_map; std::unordered_map<uint32, WPPath*> waypoint_map;
}; };
// all events for a single entry // all events for a single entry
@@ -1645,7 +1645,7 @@ typedef std::vector<SmartScriptHolder> SmartAIEventList;
typedef std::list<SmartScriptHolder> SmartAIEventStoredList; typedef std::list<SmartScriptHolder> SmartAIEventStoredList;
// all events for all entries / guids // all events for all entries / guids
typedef UNORDERED_MAP<int32, SmartAIEventList> SmartAIEventMap; typedef std::unordered_map<int32, SmartAIEventList> SmartAIEventMap;
class SmartAIMgr class SmartAIMgr
{ {
@@ -19,7 +19,7 @@
typedef std::list<AchievementCriteriaEntry const*> AchievementCriteriaEntryList; typedef std::list<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
typedef std::list<AchievementEntry const*> AchievementEntryList; typedef std::list<AchievementEntry const*> AchievementEntryList;
typedef UNORDERED_MAP<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement; typedef std::unordered_map<uint32, AchievementCriteriaEntryList> AchievementCriteriaListByAchievement;
typedef std::map<uint32, AchievementEntryList> AchievementListByReferencedId; typedef std::map<uint32, AchievementEntryList> AchievementListByReferencedId;
struct CriteriaProgress struct CriteriaProgress
@@ -244,8 +244,8 @@ struct CompletedAchievementData
bool changed; bool changed;
}; };
typedef UNORDERED_MAP<uint32, CriteriaProgress> CriteriaProgressMap; typedef std::unordered_map<uint32, CriteriaProgress> CriteriaProgressMap;
typedef UNORDERED_MAP<uint32, CompletedAchievementData> CompletedAchievementMap; typedef std::unordered_map<uint32, CompletedAchievementData> CompletedAchievementMap;
class Unit; class Unit;
class Player; class Player;
@@ -377,7 +377,7 @@ class AchievementGlobalMgr
// store achievements by referenced achievement id to speed up lookup // store achievements by referenced achievement id to speed up lookup
AchievementListByReferencedId m_AchievementListByReferencedId; AchievementListByReferencedId m_AchievementListByReferencedId;
typedef UNORDERED_MAP<uint32 /*achievementId*/, std::chrono::system_clock::time_point /*completionTime*/> AllCompletedAchievements; typedef std::unordered_map<uint32 /*achievementId*/, std::chrono::system_clock::time_point /*completionTime*/> AllCompletedAchievements;
AllCompletedAchievements m_allCompletedAchievements; AllCompletedAchievements m_allCompletedAchievements;
AchievementRewards m_achievementRewards; AchievementRewards m_achievementRewards;
@@ -139,7 +139,7 @@ class AuctionHouseMgr
public: public:
typedef UNORDERED_MAP<uint32, Item*> ItemMap; typedef std::unordered_map<uint32, Item*> ItemMap;
AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId); AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
AuctionHouseObject* GetBidsMap(uint32 factionTemplateId); AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
+1 -1
View File
@@ -66,7 +66,7 @@ class Unit;
class Battlefield; class Battlefield;
class BfGraveyard; class BfGraveyard;
typedef UNORDERED_SET<uint64> GuidSet; typedef std::unordered_set<uint64> GuidSet;
typedef std::vector<BfGraveyard*> GraveyardVect; typedef std::vector<BfGraveyard*> GraveyardVect;
typedef std::map<uint64, time_t> PlayerTimerMap; typedef std::map<uint64, time_t> PlayerTimerMap;
+1 -1
View File
@@ -16,7 +16,7 @@ class ArenaTeamMgr
~ArenaTeamMgr(); ~ArenaTeamMgr();
public: public:
typedef UNORDERED_MAP<uint32, ArenaTeam*> ArenaTeamContainer; typedef std::unordered_map<uint32, ArenaTeam*> ArenaTeamContainer;
ArenaTeam* GetArenaTeamById(uint32 arenaTeamId) const; ArenaTeam* GetArenaTeamById(uint32 arenaTeamId) const;
ArenaTeam* GetArenaTeamByName(std::string const& arenaTeamName) const; ArenaTeam* GetArenaTeamByName(std::string const& arenaTeamName) const;
@@ -16,7 +16,7 @@
#include <unordered_map> #include <unordered_map>
typedef std::map<uint32, Battleground*> BattlegroundContainer; typedef std::map<uint32, Battleground*> BattlegroundContainer;
typedef UNORDERED_MAP<uint32, BattlegroundTypeId> BattleMastersMap; typedef std::unordered_map<uint32, BattlegroundTypeId> BattleMastersMap;
typedef Battleground*(*bgRef)(Battleground*); typedef Battleground*(*bgRef)(Battleground*);
+2 -2
View File
@@ -252,8 +252,8 @@ struct CalendarEvent
std::string _description; std::string _description;
}; };
typedef std::vector<CalendarInvite*> CalendarInviteStore; typedef std::vector<CalendarInvite*> CalendarInviteStore;
typedef UNORDERED_SET<CalendarEvent*> CalendarEventStore; typedef std::unordered_set<CalendarEvent*> CalendarEventStore;
typedef UNORDERED_MAP<uint64 /* eventId */, CalendarInviteStore > CalendarEventInviteStore; typedef std::unordered_map<uint64 /* eventId */, CalendarInviteStore > CalendarEventInviteStore;
class CalendarMgr class CalendarMgr
{ {
+3 -3
View File
@@ -308,9 +308,9 @@ class Channel
} }
} }
typedef UNORDERED_MAP<uint64, PlayerInfo> PlayerContainer; typedef std::unordered_map<uint64, PlayerInfo> PlayerContainer;
typedef UNORDERED_MAP<uint32, uint32> BannedContainer; typedef std::unordered_map<uint32, uint32> BannedContainer;
typedef UNORDERED_SET<Player*> PlayersWatchingContainer; typedef std::unordered_set<Player*> PlayersWatchingContainer;
bool _announce; bool _announce;
bool _ownership; bool _ownership;
+1 -1
View File
@@ -19,7 +19,7 @@
class ChannelMgr class ChannelMgr
{ {
typedef UNORDERED_MAP<std::wstring, Channel*> ChannelMap; typedef std::unordered_map<std::wstring, Channel*> ChannelMap;
typedef std::map<std::string, ChannelRights> ChannelRightsMap; typedef std::map<std::string, ChannelRights> ChannelRightsMap;
public: public:
+7 -7
View File
@@ -232,7 +232,7 @@ typedef std::map<uint64, LfgProposalPlayer> LfgProposalPlayerContainer;
typedef std::map<uint64, LfgPlayerBoot> LfgPlayerBootContainer; typedef std::map<uint64, LfgPlayerBoot> LfgPlayerBootContainer;
typedef std::map<uint64, LfgGroupData> LfgGroupDataContainer; typedef std::map<uint64, LfgGroupData> LfgGroupDataContainer;
typedef std::map<uint64, LfgPlayerData> LfgPlayerDataContainer; typedef std::map<uint64, LfgPlayerData> LfgPlayerDataContainer;
typedef UNORDERED_MAP<uint32, LFGDungeonData> LFGDungeonContainer; typedef std::unordered_map<uint32, LFGDungeonData> LFGDungeonContainer;
// Data needed by SMSG_LFG_JOIN_RESULT // Data needed by SMSG_LFG_JOIN_RESULT
struct LfgJoinResultData struct LfgJoinResultData
@@ -386,15 +386,15 @@ class LFGMgr
~LFGMgr(); ~LFGMgr();
// pussywizard: RAIDBROWSER // pussywizard: RAIDBROWSER
typedef UNORDERED_MAP<uint32 /*playerGuidLow*/, RBEntryInfo> RBEntryInfoMap; typedef std::unordered_map<uint32 /*playerGuidLow*/, RBEntryInfo> RBEntryInfoMap;
typedef UNORDERED_MAP<uint32 /*dungeonId*/, RBEntryInfoMap> RBStoreMap; typedef std::unordered_map<uint32 /*dungeonId*/, RBEntryInfoMap> RBStoreMap;
RBStoreMap RaidBrowserStore[2]; // for 2 factions RBStoreMap RaidBrowserStore[2]; // for 2 factions
typedef UNORDERED_MAP<uint32 /*playerGuidLow*/, uint32 /*dungeonId*/> RBSearchersMap; typedef std::unordered_map<uint32 /*playerGuidLow*/, uint32 /*dungeonId*/> RBSearchersMap;
RBSearchersMap RBSearchersStore[2]; // for 2 factions RBSearchersMap RBSearchersStore[2]; // for 2 factions
typedef UNORDERED_MAP<uint32 /*dungeonId*/, WorldPacket> RBCacheMap; typedef std::unordered_map<uint32 /*dungeonId*/, WorldPacket> RBCacheMap;
RBCacheMap RBCacheStore[2]; // for 2 factions RBCacheMap RBCacheStore[2]; // for 2 factions
typedef UNORDERED_MAP<uint32 /*guidLow*/, RBInternalInfo> RBInternalInfoMap; typedef std::unordered_map<uint32 /*guidLow*/, RBInternalInfo> RBInternalInfoMap;
typedef UNORDERED_MAP<uint32 /*dungeonId*/, RBInternalInfoMap> RBInternalInfoMapMap; typedef std::unordered_map<uint32 /*dungeonId*/, RBInternalInfoMap> RBInternalInfoMapMap;
RBInternalInfoMapMap RBInternalInfoStorePrev[2]; // for 2 factions RBInternalInfoMapMap RBInternalInfoStorePrev[2]; // for 2 factions
RBInternalInfoMapMap RBInternalInfoStoreCurr[2]; // for 2 factions RBInternalInfoMapMap RBInternalInfoStoreCurr[2]; // for 2 factions
typedef std::set<uint32 /*dungeonId*/> RBUsedDungeonsSet; // needs to be ordered typedef std::set<uint32 /*dungeonId*/> RBUsedDungeonsSet; // needs to be ordered
+7 -7
View File
@@ -165,7 +165,7 @@ typedef std::vector<uint32> CreatureQuestItemList;
typedef std::unordered_map<uint32, CreatureQuestItemList> CreatureQuestItemMap; typedef std::unordered_map<uint32, CreatureQuestItemList> CreatureQuestItemMap;
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint32, CreatureTemplate> CreatureTemplateContainer; typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer;
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
#if defined(__GNUC__) #if defined(__GNUC__)
@@ -213,7 +213,7 @@ struct CreatureBaseStats
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass); static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
}; };
typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsContainer; typedef std::unordered_map<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
struct CreatureLocale struct CreatureLocale
{ {
@@ -240,8 +240,8 @@ struct EquipmentInfo
}; };
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint8, EquipmentInfo> EquipmentInfoContainerInternal; typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
typedef UNORDERED_MAP<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer; typedef std::unordered_map<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
// from `creature` table // from `creature` table
struct CreatureData struct CreatureData
@@ -282,7 +282,7 @@ struct CreatureModelInfo
}; };
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint16, CreatureModelInfo> CreatureModelContainer; typedef std::unordered_map<uint16, CreatureModelInfo> CreatureModelContainer;
enum InhabitTypeValues enum InhabitTypeValues
{ {
@@ -323,7 +323,7 @@ struct CreatureAddon
std::vector<uint32> auras; std::vector<uint32> auras;
}; };
typedef UNORDERED_MAP<uint32, CreatureAddon> CreatureAddonContainer; typedef std::unordered_map<uint32, CreatureAddon> CreatureAddonContainer;
// Vendors // Vendors
struct VendorItem struct VendorItem
@@ -399,7 +399,7 @@ struct TrainerSpell
bool IsCastable() const { return learnedSpell[0] != spell; } bool IsCastable() const { return learnedSpell[0] != spell; }
}; };
typedef UNORDERED_MAP<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap; typedef std::unordered_map<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
struct TrainerSpellData struct TrainerSpellData
{ {
@@ -8,7 +8,7 @@
#define _FORMATIONS_H #define _FORMATIONS_H
#include "Define.h" #include "Define.h"
#include "UnorderedMap.h" #include <unordered_map>
#include <map> #include <map>
class Creature; class Creature;
@@ -24,7 +24,7 @@ struct FormationInfo
uint16 point_2; uint16 point_2;
}; };
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType; typedef std::unordered_map<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
class FormationMgr class FormationMgr
{ {
@@ -541,8 +541,8 @@ struct GameObjectTemplateAddon
}; };
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint32, GameObjectTemplate> GameObjectTemplateContainer; typedef std::unordered_map<uint32, GameObjectTemplate> GameObjectTemplateContainer;
typedef UNORDERED_MAP<uint32, GameObjectTemplateAddon> GameObjectTemplateAddonContainer; typedef std::unordered_map<uint32, GameObjectTemplateAddon> GameObjectTemplateAddonContainer;
class OPvPCapturePoint; class OPvPCapturePoint;
struct TransportAnimation; struct TransportAnimation;
@@ -586,7 +586,7 @@ struct GameObjectAddon
uint32 InvisibilityValue; uint32 InvisibilityValue;
}; };
typedef UNORDERED_MAP<uint32, GameObjectAddon> GameObjectAddonContainer; typedef std::unordered_map<uint32, GameObjectAddon> GameObjectAddonContainer;
// client side GO show states // client side GO show states
enum GOState enum GOState
@@ -28,7 +28,7 @@ struct EnchStoreItem
}; };
typedef std::vector<EnchStoreItem> EnchStoreList; typedef std::vector<EnchStoreItem> EnchStoreList;
typedef UNORDERED_MAP<uint32, EnchStoreList> EnchantmentStore; typedef std::unordered_map<uint32, EnchStoreList> EnchantmentStore;
static EnchantmentStore RandomItemEnch; static EnchantmentStore RandomItemEnch;
@@ -778,7 +778,7 @@ struct ItemTemplate
}; };
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint32, ItemTemplate> ItemTemplateContainer; typedef std::unordered_map<uint32, ItemTemplate> ItemTemplateContainer;
struct ItemLocale struct ItemLocale
{ {
+2 -2
View File
@@ -117,8 +117,8 @@ class Transport;
class StaticTransport; class StaticTransport;
class MotionTransport; class MotionTransport;
typedef UNORDERED_MAP<Player*, UpdateData> UpdateDataMapType; typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType;
typedef UNORDERED_SET<uint32> UpdatePlayerSet; typedef std::unordered_set<uint32> UpdatePlayerSet;
class Object class Object
{ {
+1 -1
View File
@@ -36,7 +36,7 @@ class AsynchPetSummon
uint64 m_casterGUID; uint64 m_casterGUID;
}; };
typedef UNORDERED_MAP<uint32, PetSpell> PetSpellMap; typedef std::unordered_map<uint32, PetSpell> PetSpellMap;
typedef std::vector<uint32> AutoSpellList; typedef std::vector<uint32> AutoSpellList;
class Player; class Player;
+8 -8
View File
@@ -118,8 +118,8 @@ struct SpellModifier
Aura* const ownerAura; Aura* const ownerAura;
}; };
typedef UNORDERED_MAP<uint32, PlayerTalent*> PlayerTalentMap; typedef std::unordered_map<uint32, PlayerTalent*> PlayerTalentMap;
typedef UNORDERED_MAP<uint32, PlayerSpell*> PlayerSpellMap; typedef std::unordered_map<uint32, PlayerSpell*> PlayerSpellMap;
typedef std::list<SpellModifier*> SpellModList; typedef std::list<SpellModifier*> SpellModList;
typedef std::list<uint64> WhisperListContainer; typedef std::list<uint64> WhisperListContainer;
@@ -134,7 +134,7 @@ struct SpellCooldown
}; };
typedef std::map<uint32, SpellCooldown> SpellCooldowns; typedef std::map<uint32, SpellCooldown> SpellCooldowns;
typedef UNORDERED_MAP<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap; typedef std::unordered_map<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap;
enum TrainerSpellState enum TrainerSpellState
{ {
@@ -517,7 +517,7 @@ enum AtLoginFlags
}; };
typedef std::map<uint32, QuestStatusData> QuestStatusMap; typedef std::map<uint32, QuestStatusData> QuestStatusMap;
typedef UNORDERED_SET<uint32> RewardedQuestSet; typedef std::unordered_set<uint32> RewardedQuestSet;
// quest, keep // quest, keep
typedef std::map<uint32, bool> QuestStatusSaveMap; typedef std::map<uint32, bool> QuestStatusSaveMap;
@@ -556,7 +556,7 @@ struct SkillStatusData
SkillUpdateState uState; SkillUpdateState uState;
}; };
typedef UNORDERED_MAP<uint32, SkillStatusData> SkillStatusMap; typedef std::unordered_map<uint32, SkillStatusData> SkillStatusMap;
class Quest; class Quest;
class Spell; class Spell;
@@ -1637,7 +1637,7 @@ class Player : public Unit, public GridObject<Player>
uint8 unReadMails; uint8 unReadMails;
time_t m_nextMailDelivereTime; time_t m_nextMailDelivereTime;
typedef UNORDERED_MAP<uint32, Item*> ItemMap; typedef std::unordered_map<uint32, Item*> ItemMap;
ItemMap mMitems; //template defined in objectmgr.cpp ItemMap mMitems; //template defined in objectmgr.cpp
@@ -2364,7 +2364,7 @@ class Player : public Unit, public GridObject<Player>
void SetEntryPoint(); void SetEntryPoint();
// currently visible objects at player client // currently visible objects at player client
typedef UNORDERED_SET<uint64> ClientGUIDs; typedef std::unordered_set<uint64> ClientGUIDs;
ClientGUIDs m_clientGUIDs; ClientGUIDs m_clientGUIDs;
std::vector<Unit*> m_newVisible; // pussywizard std::vector<Unit*> m_newVisible; // pussywizard
@@ -2656,7 +2656,7 @@ class Player : public Unit, public GridObject<Player>
//We allow only one timed quest active at the same time. Below can then be simple value instead of set. //We allow only one timed quest active at the same time. Below can then be simple value instead of set.
typedef std::set<uint32> QuestSet; typedef std::set<uint32> QuestSet;
typedef std::set<uint32> SeasonalQuestSet; typedef std::set<uint32> SeasonalQuestSet;
typedef UNORDERED_MAP<uint32,SeasonalQuestSet> SeasonalEventQuestMap; typedef std::unordered_map<uint32,SeasonalQuestSet> SeasonalEventQuestMap;
QuestSet m_timedquests; QuestSet m_timedquests;
QuestSet m_weeklyquests; QuestSet m_weeklyquests;
QuestSet m_monthlyquests; QuestSet m_monthlyquests;
+1 -1
View File
@@ -19462,7 +19462,7 @@ void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns c
data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size()); data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size());
data << uint64(GetGUID()); data << uint64(GetGUID());
data << uint8(flags); data << uint8(flags);
for (UNORDERED_MAP<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr) for (std::unordered_map<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
{ {
data << uint32(itr->first); data << uint32(itr->first);
data << uint32(itr->second); data << uint32(itr->second);
+4 -4
View File
@@ -1070,7 +1070,7 @@ struct GlobalCooldown
uint32 cast_time; uint32 cast_time;
}; };
typedef UNORDERED_MAP<uint32 /*category*/, GlobalCooldown> GlobalCooldownList; typedef std::unordered_map<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
class GlobalCooldownMgr // Shared by Player and CharmInfo class GlobalCooldownMgr // Shared by Player and CharmInfo
{ {
@@ -1289,7 +1289,7 @@ enum SpellCooldownFlags
SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set
}; };
typedef UNORDERED_MAP<uint32, uint32> PacketCooldowns; typedef std::unordered_map<uint32, uint32> PacketCooldowns;
// delay time next attack to prevent client attack animation problems // delay time next attack to prevent client attack animation problems
#define ATTACK_DISPLAY_DELAY 200 #define ATTACK_DISPLAY_DELAY 200
@@ -1343,7 +1343,7 @@ private:
class Unit : public WorldObject class Unit : public WorldObject
{ {
public: public:
typedef UNORDERED_SET<Unit*> AttackerSet; typedef std::unordered_set<Unit*> AttackerSet;
typedef std::set<Unit*> ControlSet; typedef std::set<Unit*> ControlSet;
typedef std::multimap<uint32, Aura*> AuraMap; typedef std::multimap<uint32, Aura*> AuraMap;
@@ -1361,7 +1361,7 @@ class Unit : public WorldObject
typedef std::list<Aura*> AuraList; typedef std::list<Aura*> AuraList;
typedef std::list<AuraApplication *> AuraApplicationList; typedef std::list<AuraApplication *> AuraApplicationList;
typedef std::list<DiminishingReturn> Diminishing; typedef std::list<DiminishingReturn> Diminishing;
typedef UNORDERED_SET<uint32> ComboPointHolderSet; typedef std::unordered_set<uint32> ComboPointHolderSet;
typedef std::map<uint8, AuraApplication*> VisibleAuraMap; typedef std::map<uint8, AuraApplication*> VisibleAuraMap;
+8 -11
View File
@@ -8,15 +8,12 @@
#define TRINITY_OBJECTACCESSOR_H #define TRINITY_OBJECTACCESSOR_H
#include "Define.h" #include "Define.h"
#include <ace/Singleton.h>
#include <ace/Thread_Mutex.h>
#include "UnorderedMap.h"
#include "UpdateData.h" #include "UpdateData.h"
#include "GridDefines.h" #include "GridDefines.h"
#include "Object.h" #include "Object.h"
#include <ace/Singleton.h>
#include <ace/Thread_Mutex.h>
#include <unordered_map>
#include <set> #include <set>
class Creature; class Creature;
@@ -37,7 +34,7 @@ class HashMapHolder
{ {
public: public:
typedef UNORDERED_MAP<uint64, T*> MapType; typedef std::unordered_map<uint64, T*> MapType;
typedef ACE_RW_Thread_Mutex LockType; typedef ACE_RW_Thread_Mutex LockType;
static void Insert(T* o) static void Insert(T* o)
@@ -74,7 +71,7 @@ class HashMapHolder
/// Define the static members of HashMapHolder /// Define the static members of HashMapHolder
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap; template <class T> std::unordered_map< uint64, T* > HashMapHolder<T>::m_objectMap;
template <class T> typename HashMapHolder<T>::LockType HashMapHolder<T>::i_lock; template <class T> typename HashMapHolder<T>::LockType HashMapHolder<T>::i_lock;
// pussywizard: // pussywizard:
@@ -267,10 +264,10 @@ class ObjectAccessor
static void _buildPacket(Player*, Object*, UpdateDataMapType&); static void _buildPacket(Player*, Object*, UpdateDataMapType&);
void _update(); void _update();
typedef UNORDERED_MAP<uint64, Corpse*> Player2CorpsesMapType; typedef std::unordered_map<uint64, Corpse*> Player2CorpsesMapType;
typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType; typedef std::unordered_map<Player*, UpdateData>::value_type UpdateDataValueType;
UNORDERED_SET<Object*> i_objects; std::unordered_set<Object*> i_objects;
Player2CorpsesMapType i_player2corpse; Player2CorpsesMapType i_player2corpse;
std::list<uint64> i_playerBones; std::list<uint64> i_playerBones;
+39 -39
View File
@@ -113,11 +113,11 @@ enum ScriptCommands
SCRIPT_COMMAND_PLAYMOVIE = 34 // source = Player, datalong = movie id SCRIPT_COMMAND_PLAYMOVIE = 34 // source = Player, datalong = movie id
}; };
// Benchmarked: Faster than UNORDERED_MAP (insert/find) // Benchmarked: Faster than std::unordered_map (insert/find)
typedef std::map<uint32, PageText> PageTextContainer; typedef std::map<uint32, PageText> PageTextContainer;
// Benchmarked: Faster than std::map (insert/find) // Benchmarked: Faster than std::map (insert/find)
typedef UNORDERED_MAP<uint16, InstanceTemplate> InstanceTemplateContainer; typedef std::unordered_map<uint16, InstanceTemplate> InstanceTemplateContainer;
struct GameTele struct GameTele
{ {
@@ -130,7 +130,7 @@ struct GameTele
std::wstring wnameLow; std::wstring wnameLow;
}; };
typedef UNORDERED_MAP<uint32, GameTele > GameTeleContainer; typedef std::unordered_map<uint32, GameTele > GameTeleContainer;
enum ScriptsType enum ScriptsType
{ {
@@ -456,15 +456,15 @@ struct BroadcastText
typedef std::unordered_map<uint32, BroadcastText> BroadcastTextContainer; typedef std::unordered_map<uint32, BroadcastText> BroadcastTextContainer;
typedef std::set<uint32> CellGuidSet; typedef std::set<uint32> CellGuidSet;
typedef UNORDERED_MAP<uint32/*player guid*/, uint32/*instance*/> CellCorpseSet; typedef std::unordered_map<uint32/*player guid*/, uint32/*instance*/> CellCorpseSet;
struct CellObjectGuids struct CellObjectGuids
{ {
CellGuidSet creatures; CellGuidSet creatures;
CellGuidSet gameobjects; CellGuidSet gameobjects;
CellCorpseSet corpses; CellCorpseSet corpses;
}; };
typedef UNORDERED_MAP<uint32/*cell_id*/, CellObjectGuids> CellObjectGuidsMap; typedef std::unordered_map<uint32/*cell_id*/, CellObjectGuids> CellObjectGuidsMap;
typedef UNORDERED_MAP<uint32/*(mapid, spawnMode) pair*/, CellObjectGuidsMap> MapObjectGuids; typedef std::unordered_map<uint32/*(mapid, spawnMode) pair*/, CellObjectGuidsMap> MapObjectGuids;
// Trinity string ranges // Trinity string ranges
#define MIN_TRINITY_STRING_ID 1 // 'trinity_string' #define MIN_TRINITY_STRING_ID 1 // 'trinity_string'
@@ -481,21 +481,21 @@ struct TrinityString
}; };
typedef std::map<uint64, uint64> LinkedRespawnContainer; typedef std::map<uint64, uint64> LinkedRespawnContainer;
typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataContainer; typedef std::unordered_map<uint32, CreatureData> CreatureDataContainer;
typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataContainer; typedef std::unordered_map<uint32, GameObjectData> GameObjectDataContainer;
typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer; typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer;
typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleContainer; typedef std::unordered_map<uint32, CreatureLocale> CreatureLocaleContainer;
typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleContainer; typedef std::unordered_map<uint32, GameObjectLocale> GameObjectLocaleContainer;
typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleContainer; typedef std::unordered_map<uint32, ItemLocale> ItemLocaleContainer;
typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer; typedef std::unordered_map<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleContainer; typedef std::unordered_map<uint32, QuestLocale> QuestLocaleContainer;
typedef UNORDERED_MAP<uint32, QuestOfferRewardLocale> QuestOfferRewardLocaleContainer; typedef std::unordered_map<uint32, QuestOfferRewardLocale> QuestOfferRewardLocaleContainer;
typedef UNORDERED_MAP<uint32, QuestRequestItemsLocale> QuestRequestItemsLocaleContainer; typedef std::unordered_map<uint32, QuestRequestItemsLocale> QuestRequestItemsLocaleContainer;
typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleContainer; typedef std::unordered_map<uint32, NpcTextLocale> NpcTextLocaleContainer;
typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleContainer; typedef std::unordered_map<uint32, PageTextLocale> PageTextLocaleContainer;
typedef UNORDERED_MAP<int32, TrinityString> TrinityStringContainer; typedef std::unordered_map<int32, TrinityString> TrinityStringContainer;
typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer; typedef std::unordered_map<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer; typedef std::unordered_map<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
typedef std::multimap<uint32, uint32> QuestRelations; typedef std::multimap<uint32, uint32> QuestRelations;
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds; typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
@@ -523,7 +523,7 @@ struct MailLevelReward
}; };
typedef std::list<MailLevelReward> MailLevelRewardList; typedef std::list<MailLevelReward> MailLevelRewardList;
typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer; typedef std::unordered_map<uint8, MailLevelRewardList> MailLevelRewardContainer;
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization // We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
struct RepRewardRate struct RepRewardRate
@@ -625,10 +625,10 @@ struct QuestPOI
}; };
typedef std::vector<QuestPOI> QuestPOIVector; typedef std::vector<QuestPOI> QuestPOIVector;
typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIContainer; typedef std::unordered_map<uint32, QuestPOIVector> QuestPOIContainer;
typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemContainer; typedef std::unordered_map<uint32, VendorItemData> CacheVendorItemContainer;
typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellContainer; typedef std::unordered_map<uint32, TrainerSpellData> CacheTrainerSpellContainer;
enum SkillRangeType enum SkillRangeType
{ {
@@ -671,7 +671,7 @@ struct DungeonEncounter
}; };
typedef std::list<DungeonEncounter const*> DungeonEncounterList; typedef std::list<DungeonEncounter const*> DungeonEncounterList;
typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterContainer; typedef std::unordered_map<uint32, DungeonEncounterList> DungeonEncounterContainer;
class PlayerDumpReader; class PlayerDumpReader;
@@ -685,23 +685,23 @@ class ObjectMgr
~ObjectMgr(); ~ObjectMgr();
public: public:
typedef UNORDERED_MAP<uint32, Item*> ItemMap; typedef std::unordered_map<uint32, Item*> ItemMap;
typedef UNORDERED_MAP<uint32, Quest*> QuestMap; typedef std::unordered_map<uint32, Quest*> QuestMap;
typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer; typedef std::unordered_map<uint32, AreaTrigger> AreaTriggerContainer;
typedef UNORDERED_MAP<uint32, AreaTriggerTeleport> AreaTriggerTeleportContainer; typedef std::unordered_map<uint32, AreaTriggerTeleport> AreaTriggerTeleportContainer;
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer; typedef std::unordered_map<uint32, uint32> AreaTriggerScriptContainer;
typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer; typedef std::unordered_map<uint32, AccessRequirement*> AccessRequirementContainer;
typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer; typedef std::unordered_map<uint32, RepRewardRate > RepRewardRateContainer;
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer; typedef std::unordered_map<uint32, ReputationOnKillEntry> RepOnKillContainer;
typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer; typedef std::unordered_map<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestContainer; typedef std::unordered_map<uint32, PointOfInterest> PointOfInterestContainer;
typedef std::vector<std::string> ScriptNameContainer; typedef std::vector<std::string> ScriptNameContainer;
@@ -885,7 +885,7 @@ class ObjectMgr
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty) DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
{ {
UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty)); std::unordered_map<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
if (itr != _dungeonEncounterStore.end()) if (itr != _dungeonEncounterStore.end())
return &itr->second; return &itr->second;
return NULL; return NULL;
@@ -1349,8 +1349,8 @@ class ObjectMgr
QuestMap _questTemplates; QuestMap _questTemplates;
std::vector<Quest*> _questTemplatesFast; // pussywizard std::vector<Quest*> _questTemplatesFast; // pussywizard
typedef UNORDERED_MAP<uint32, GossipText> GossipTextContainer; typedef std::unordered_map<uint32, GossipText> GossipTextContainer;
typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerContainer; typedef std::unordered_map<uint32, uint32> QuestAreaTriggerContainer;
typedef std::set<uint32> TavernAreaTriggerContainer; typedef std::set<uint32> TavernAreaTriggerContainer;
QuestAreaTriggerContainer _questAreaTriggerStore; QuestAreaTriggerContainer _questAreaTriggerStore;
@@ -1429,7 +1429,7 @@ class ObjectMgr
HalfNameContainer _petHalfName0; HalfNameContainer _petHalfName0;
HalfNameContainer _petHalfName1; HalfNameContainer _petHalfName1;
typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameContainer; typedef std::unordered_map<uint32, ItemSetNameEntry> ItemSetNameContainer;
ItemSetNameContainer _itemSetNameStore; ItemSetNameContainer _itemSetNameStore;
MapObjectGuids _mapObjectGuidsStore; MapObjectGuids _mapObjectGuidsStore;
+1 -1
View File
@@ -648,7 +648,7 @@ private:
void CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count); void CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count);
}; };
typedef UNORDERED_MAP<uint32, Member*> Members; typedef std::unordered_map<uint32, Member*> Members;
typedef std::vector<RankInfo> Ranks; typedef std::vector<RankInfo> Ranks;
typedef std::vector<BankTab*> BankTabs; typedef std::vector<BankTab*> BankTabs;
+1 -1
View File
@@ -32,7 +32,7 @@ public:
void ResetTimes(); void ResetTimes();
protected: protected:
typedef UNORDERED_MAP<uint32, Guild*> GuildContainer; typedef std::unordered_map<uint32, Guild*> GuildContainer;
uint32 NextGuildId; uint32 NextGuildId;
GuildContainer GuildStore; GuildContainer GuildStore;
}; };
+2 -2
View File
@@ -434,14 +434,14 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recvData)
} }
// Read quest ids and add the in a unordered_set so we don't send POIs for the same quest multiple times // Read quest ids and add the in a unordered_set so we don't send POIs for the same quest multiple times
UNORDERED_SET<uint32> questIds; std::unordered_set<uint32> questIds;
for (uint32 i = 0; i < count; ++i) for (uint32 i = 0; i < count; ++i)
questIds.insert(recvData.read<uint32>()); // quest id questIds.insert(recvData.read<uint32>()); // quest id
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4 + (4 + 4)*questIds.size()); WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4 + (4 + 4)*questIds.size());
data << uint32(questIds.size()); // count data << uint32(questIds.size()); // count
for (UNORDERED_SET<uint32>::const_iterator itr = questIds.begin(); itr != questIds.end(); ++itr) for (std::unordered_set<uint32>::const_iterator itr = questIds.begin(); itr != questIds.end(); ++itr)
{ {
uint32 questId = *itr; uint32 questId = *itr;
bool questOk = false; bool questOk = false;
+1 -1
View File
@@ -176,7 +176,7 @@ void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data)
uint32 mainSurvey; // GMSurveyCurrentSurvey.dbc, column 1 (all 9) ref to GMSurveySurveys.dbc uint32 mainSurvey; // GMSurveyCurrentSurvey.dbc, column 1 (all 9) ref to GMSurveySurveys.dbc
recv_data >> mainSurvey; recv_data >> mainSurvey;
UNORDERED_SET<uint32> surveyIds; std::unordered_set<uint32> surveyIds;
SQLTransaction trans = CharacterDatabase.BeginTransaction(); SQLTransaction trans = CharacterDatabase.BeginTransaction();
// sub_survey1, r1, comment1, sub_survey2, r2, comment2, sub_survey3, r3, comment3, sub_survey4, r4, comment4, sub_survey5, r5, comment5, sub_survey6, r6, comment6, sub_survey7, r7, comment7, sub_survey8, r8, comment8, sub_survey9, r9, comment9, sub_survey10, r10, comment10, // sub_survey1, r1, comment1, sub_survey2, r2, comment2, sub_survey3, r3, comment3, sub_survey4, r4, comment4, sub_survey5, r5, comment5, sub_survey6, r6, comment6, sub_survey7, r7, comment7, sub_survey8, r8, comment8, sub_survey9, r9, comment9, sub_survey10, r10, comment10,
for (uint8 i = 0; i < 10; i++) for (uint8 i = 0; i < 10; i++)
+8 -8
View File
@@ -8,15 +8,15 @@
#define _INSTANCESAVEMGR_H #define _INSTANCESAVEMGR_H
#include "Define.h" #include "Define.h"
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "ObjectDefines.h"
#include <ace/Singleton.h> #include <ace/Singleton.h>
#include <ace/Null_Mutex.h> #include <ace/Null_Mutex.h>
#include <ace/Thread_Mutex.h> #include <ace/Thread_Mutex.h>
#include <list> #include <list>
#include <map> #include <map>
#include "UnorderedMap.h" #include <unordered_map>
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "ObjectDefines.h"
struct InstanceTemplate; struct InstanceTemplate;
struct MapEntry; struct MapEntry;
@@ -33,14 +33,14 @@ struct InstancePlayerBind
InstancePlayerBind() : save(NULL), perm(false), extended(false) {} InstancePlayerBind() : save(NULL), perm(false), extended(false) {}
}; };
typedef UNORDERED_MAP< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap; typedef std::unordered_map< uint32 /*mapId*/, InstancePlayerBind > BoundInstancesMap;
struct BoundInstancesMapWrapper struct BoundInstancesMapWrapper
{ {
BoundInstancesMap m[MAX_DIFFICULTY]; BoundInstancesMap m[MAX_DIFFICULTY];
}; };
typedef UNORDERED_MAP< uint32 /*guidLow*/, BoundInstancesMapWrapper* > PlayerBindStorage; typedef std::unordered_map< uint32 /*guidLow*/, BoundInstancesMapWrapper* > PlayerBindStorage;
class InstanceSave class InstanceSave
{ {
@@ -94,7 +94,7 @@ class InstanceSave
ACE_Thread_Mutex _lock; ACE_Thread_Mutex _lock;
}; };
typedef UNORDERED_MAP<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap; typedef std::unordered_map<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
class InstanceSaveManager class InstanceSaveManager
{ {
@@ -106,7 +106,7 @@ class InstanceSaveManager
~InstanceSaveManager(); ~InstanceSaveManager();
public: public:
typedef UNORDERED_MAP<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap; typedef std::unordered_map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
struct InstResetEvent struct InstResetEvent
{ {
+1 -1
View File
@@ -26,7 +26,7 @@ struct StoredLootItem
}; };
typedef std::list<StoredLootItem> StoredLootItemList; typedef std::list<StoredLootItem> StoredLootItemList;
typedef UNORDERED_MAP<uint32, StoredLootItemList> LootItemContainer; typedef std::unordered_map<uint32, StoredLootItemList> LootItemContainer;
class LootItemStorage class LootItemStorage
{ {
+1 -1
View File
@@ -186,7 +186,7 @@ typedef std::vector<QuestItem> QuestItemList;
typedef std::vector<LootItem> LootItemList; typedef std::vector<LootItem> LootItemList;
typedef std::map<uint32, QuestItemList*> QuestItemMap; typedef std::map<uint32, QuestItemList*> QuestItemMap;
typedef std::list<LootStoreItem*> LootStoreItemList; typedef std::list<LootStoreItem*> LootStoreItemList;
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap; typedef std::unordered_map<uint32, LootTemplate*> LootTemplateMap;
typedef std::set<uint32> LootIdSet; typedef std::set<uint32> LootIdSet;
+2 -2
View File
@@ -783,7 +783,7 @@ void Map::HandleDelayedVisibility()
{ {
if (i_objectsForDelayedVisibility.empty()) if (i_objectsForDelayedVisibility.empty())
return; return;
for (UNORDERED_SET<Unit*>::iterator itr = i_objectsForDelayedVisibility.begin(); itr != i_objectsForDelayedVisibility.end(); ++itr) for (std::unordered_set<Unit*>::iterator itr = i_objectsForDelayedVisibility.begin(); itr != i_objectsForDelayedVisibility.end(); ++itr)
(*itr)->ExecuteDelayedUnitRelocationEvent(); (*itr)->ExecuteDelayedUnitRelocationEvent();
i_objectsForDelayedVisibility.clear(); i_objectsForDelayedVisibility.clear();
} }
@@ -2359,7 +2359,7 @@ void Map::RemoveAllObjectsInRemoveList()
//sLog->outDebug(LOG_FILTER_MAPS, "Object remover 1 check."); //sLog->outDebug(LOG_FILTER_MAPS, "Object remover 1 check.");
while (!i_objectsToRemove.empty()) while (!i_objectsToRemove.empty())
{ {
UNORDERED_SET<WorldObject*>::iterator itr = i_objectsToRemove.begin(); std::unordered_set<WorldObject*>::iterator itr = i_objectsToRemove.begin();
WorldObject* obj = *itr; WorldObject* obj = *itr;
i_objectsToRemove.erase(itr); i_objectsToRemove.erase(itr);
+9 -9
View File
@@ -255,7 +255,7 @@ struct ZoneDynamicInfo
#define MIN_UNLOAD_DELAY 1 // immediate unload #define MIN_UNLOAD_DELAY 1 // immediate unload
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType; typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
typedef UNORDERED_MAP<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMap; typedef std::unordered_map<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMap;
typedef std::set<MotionTransport*> TransportsContainer; typedef std::set<MotionTransport*> TransportsContainer;
enum EncounterCreditType enum EncounterCreditType
@@ -332,9 +332,9 @@ class Map : public GridRefManager<NGridType>
// pussywizard: movemaps, mmaps // pussywizard: movemaps, mmaps
ACE_RW_Thread_Mutex& GetMMapLock() const { return *(const_cast<ACE_RW_Thread_Mutex*>(&MMapLock)); } ACE_RW_Thread_Mutex& GetMMapLock() const { return *(const_cast<ACE_RW_Thread_Mutex*>(&MMapLock)); }
// pussywizard: // pussywizard:
UNORDERED_SET<Object*> i_objectsToUpdate; std::unordered_set<Object*> i_objectsToUpdate;
void BuildAndSendUpdateForObjects(); // definition in ObjectAccessor.cpp, below ObjectAccessor::Update, because it does the same for a map void BuildAndSendUpdateForObjects(); // definition in ObjectAccessor.cpp, below ObjectAccessor::Update, because it does the same for a map
UNORDERED_SET<Unit*> i_objectsForDelayedVisibility; std::unordered_set<Unit*> i_objectsForDelayedVisibility;
void HandleDelayedVisibility(); void HandleDelayedVisibility();
// some calls like isInWater should not use vmaps due to processor power // some calls like isInWater should not use vmaps due to processor power
@@ -470,7 +470,7 @@ class Map : public GridRefManager<NGridType>
time_t GetLinkedRespawnTime(uint64 guid) const; time_t GetLinkedRespawnTime(uint64 guid) const;
time_t GetCreatureRespawnTime(uint32 dbGuid) const time_t GetCreatureRespawnTime(uint32 dbGuid) const
{ {
UNORDERED_MAP<uint32 /*dbGUID*/, time_t>::const_iterator itr = _creatureRespawnTimes.find(dbGuid); std::unordered_map<uint32 /*dbGUID*/, time_t>::const_iterator itr = _creatureRespawnTimes.find(dbGuid);
if (itr != _creatureRespawnTimes.end()) if (itr != _creatureRespawnTimes.end())
return itr->second; return itr->second;
@@ -479,7 +479,7 @@ class Map : public GridRefManager<NGridType>
time_t GetGORespawnTime(uint32 dbGuid) const time_t GetGORespawnTime(uint32 dbGuid) const
{ {
UNORDERED_MAP<uint32 /*dbGUID*/, time_t>::const_iterator itr = _goRespawnTimes.find(dbGuid); std::unordered_map<uint32 /*dbGUID*/, time_t>::const_iterator itr = _goRespawnTimes.find(dbGuid);
if (itr != _goRespawnTimes.end()) if (itr != _goRespawnTimes.end())
return itr->second; return itr->second;
@@ -601,9 +601,9 @@ class Map : public GridRefManager<NGridType>
std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells; std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells;
bool i_scriptLock; bool i_scriptLock;
UNORDERED_SET<WorldObject*> i_objectsToRemove; std::unordered_set<WorldObject*> i_objectsToRemove;
std::map<WorldObject*, bool> i_objectsToSwitch; std::map<WorldObject*, bool> i_objectsToSwitch;
UNORDERED_SET<WorldObject*> i_worldObjects; std::unordered_set<WorldObject*> i_worldObjects;
typedef std::multimap<time_t, ScriptAction> ScriptScheduleMap; typedef std::multimap<time_t, ScriptAction> ScriptScheduleMap;
ScriptScheduleMap m_scriptSchedule; ScriptScheduleMap m_scriptSchedule;
@@ -636,8 +636,8 @@ class Map : public GridRefManager<NGridType>
m_activeNonPlayers.erase(obj); m_activeNonPlayers.erase(obj);
} }
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _creatureRespawnTimes; std::unordered_map<uint32 /*dbGUID*/, time_t> _creatureRespawnTimes;
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _goRespawnTimes; std::unordered_map<uint32 /*dbGUID*/, time_t> _goRespawnTimes;
ZoneDynamicInfoMap _zoneDynamicInfo; ZoneDynamicInfoMap _zoneDynamicInfo;
uint32 _defaultLight; uint32 _defaultLight;
+1 -1
View File
@@ -15,7 +15,7 @@ class MapInstanced : public Map
{ {
friend class MapManager; friend class MapManager;
public: public:
typedef UNORDERED_MAP< uint32, Map*> InstancedMaps; typedef std::unordered_map< uint32, Map*> InstancedMaps;
MapInstanced(uint32 id); MapInstanced(uint32 id);
~MapInstanced() {} ~MapInstanced() {}
+1 -1
View File
@@ -122,7 +122,7 @@ class MapManager
MapUpdater * GetMapUpdater() { return &m_updater; } MapUpdater * GetMapUpdater() { return &m_updater; }
private: private:
typedef UNORDERED_MAP<uint32, Map*> MapMapType; typedef std::unordered_map<uint32, Map*> MapMapType;
typedef std::vector<bool> InstanceIds; typedef std::vector<bool> InstanceIds;
MapManager(); MapManager();
+3 -3
View File
@@ -22,10 +22,10 @@ class Map;
typedef Movement::Spline<double> TransportSpline; typedef Movement::Spline<double> TransportSpline;
typedef std::vector<KeyFrame> KeyFrameVec; typedef std::vector<KeyFrame> KeyFrameVec;
typedef UNORDERED_MAP<uint32, TransportTemplate> TransportTemplates; typedef std::unordered_map<uint32, TransportTemplate> TransportTemplates;
typedef std::set<MotionTransport*> TransportSet; typedef std::set<MotionTransport*> TransportSet;
typedef UNORDERED_MAP<uint32, TransportSet> TransportMap; typedef std::unordered_map<uint32, TransportSet> TransportMap;
typedef UNORDERED_MAP<uint32, std::set<uint32> > TransportInstanceMap; typedef std::unordered_map<uint32, std::set<uint32> > TransportInstanceMap;
struct KeyFrame struct KeyFrame
{ {
+1 -1
View File
@@ -32,7 +32,7 @@ class Graveyard
public: public:
typedef UNORDERED_MAP<uint32, GraveyardStruct> GraveyardContainer; typedef std::unordered_map<uint32, GraveyardStruct> GraveyardContainer;
GraveyardStruct const* GetGraveyard(uint32 ID) const; GraveyardStruct const* GetGraveyard(uint32 ID) const;
GraveyardStruct const* GetGraveyard(const std::string& name) const; GraveyardStruct const* GetGraveyard(const std::string& name) const;
@@ -32,7 +32,7 @@ struct WaypointData
}; };
typedef std::vector<WaypointData*> WaypointPath; typedef std::vector<WaypointData*> WaypointPath;
typedef UNORDERED_MAP<uint32, WaypointPath> WaypointPathContainer; typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer;
class WaypointMgr class WaypointMgr
{ {
+1 -1
View File
@@ -29,7 +29,7 @@ class Pool // for Pool of Pool
{ {
}; };
typedef UNORDERED_SET<uint32> ActivePoolObjects; typedef std::unordered_set<uint32> ActivePoolObjects;
typedef std::map<uint32, uint32> ActivePoolPools; typedef std::map<uint32, uint32> ActivePoolPools;
class ActivePoolData class ActivePoolData
+1 -1
View File
@@ -54,7 +54,7 @@ class SystemMgr
~SystemMgr() {} ~SystemMgr() {}
public: public:
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap; typedef std::unordered_map<uint32, ScriptPointVector> PointMoveMap;
//Database //Database
void LoadScriptWaypoints(); void LoadScriptWaypoints();
+1 -1
View File
@@ -28,7 +28,7 @@ struct SkillDiscoveryEntry
}; };
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList; typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
typedef UNORDERED_MAP<int32, SkillDiscoveryList> SkillDiscoveryMap; typedef std::unordered_map<int32, SkillDiscoveryList> SkillDiscoveryMap;
static SkillDiscoveryMap SkillDiscoveryStore; static SkillDiscoveryMap SkillDiscoveryStore;
+6 -6
View File
@@ -273,7 +273,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 UNORDERED_MAP<uint32, SpellProcEventEntry> SpellProcEventMap; typedef std::unordered_map<uint32, SpellProcEventEntry> SpellProcEventMap;
struct SpellProcEntry struct SpellProcEntry
{ {
@@ -291,7 +291,7 @@ struct SpellProcEntry
uint32 charges; // if nonzero - owerwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite uint32 charges; // if nonzero - owerwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite
}; };
typedef UNORDERED_MAP<uint32, SpellProcEntry> SpellProcMap; typedef std::unordered_map<uint32, SpellProcEntry> SpellProcMap;
struct SpellEnchantProcEntry struct SpellEnchantProcEntry
{ {
@@ -300,7 +300,7 @@ struct SpellEnchantProcEntry
uint32 procEx; uint32 procEx;
}; };
typedef UNORDERED_MAP<uint32, SpellEnchantProcEntry> SpellEnchantProcEventMap; typedef std::unordered_map<uint32, SpellEnchantProcEntry> SpellEnchantProcEventMap;
struct SpellBonusEntry struct SpellBonusEntry
{ {
@@ -310,7 +310,7 @@ struct SpellBonusEntry
float ap_dot_bonus; float ap_dot_bonus;
}; };
typedef UNORDERED_MAP<uint32, SpellBonusEntry> SpellBonusMap; typedef std::unordered_map<uint32, SpellBonusEntry> SpellBonusMap;
enum SpellGroupSpecialFlags enum SpellGroupSpecialFlags
{ {
@@ -444,7 +444,7 @@ enum EffectRadiusIndex
class PetAura class PetAura
{ {
private: private:
typedef UNORDERED_MAP<uint32, uint32> PetAuraMap; typedef std::unordered_map<uint32, uint32> PetAuraMap;
public: public:
PetAura() : removeOnChangePet(false), damage(0) PetAura() : removeOnChangePet(false), damage(0)
@@ -527,7 +527,7 @@ struct SpellChainNode
uint8 rank; uint8 rank;
}; };
typedef UNORDERED_MAP<uint32, SpellChainNode> SpellChainMap; typedef std::unordered_map<uint32, SpellChainNode> SpellChainMap;
// spell_id req_spell // spell_id req_spell
typedef std::multimap<uint32, uint32> SpellRequiredMap; typedef std::multimap<uint32, uint32> SpellRequiredMap;
+4 -4
View File
@@ -60,15 +60,15 @@ struct CreatureTextId
}; };
typedef std::vector<CreatureTextEntry> CreatureTextGroup; // texts in a group typedef std::vector<CreatureTextEntry> CreatureTextGroup; // texts in a group
typedef UNORDERED_MAP<uint8, CreatureTextGroup> CreatureTextHolder; // groups for a creature by groupid typedef std::unordered_map<uint8, CreatureTextGroup> CreatureTextHolder; // groups for a creature by groupid
typedef UNORDERED_MAP<uint32, CreatureTextHolder> CreatureTextMap; // all creatures by entry typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; // all creatures by entry
typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap; typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap;
//used for handling non-repeatable random texts //used for handling non-repeatable random texts
typedef std::vector<uint8> CreatureTextRepeatIds; typedef std::vector<uint8> CreatureTextRepeatIds;
typedef UNORDERED_MAP<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup; typedef std::unordered_map<uint8, CreatureTextRepeatIds> CreatureTextRepeatGroup;
typedef UNORDERED_MAP<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMap;//guid based typedef std::unordered_map<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMap;//guid based
class CreatureTextMgr class CreatureTextMgr
{ {
+2 -2
View File
@@ -22,8 +22,8 @@ namespace WeatherMgr
namespace namespace
{ {
typedef UNORDERED_MAP<uint32, Trinity::AutoPtr<Weather, ACE_Null_Mutex> > WeatherMap; typedef std::unordered_map<uint32, Trinity::AutoPtr<Weather, ACE_Null_Mutex> > WeatherMap;
typedef UNORDERED_MAP<uint32, WeatherData> WeatherZoneMap; typedef std::unordered_map<uint32, WeatherData> WeatherZoneMap;
WeatherMap m_weathers; WeatherMap m_weathers;
WeatherZoneMap mWeatherZoneMap; WeatherZoneMap mWeatherZoneMap;
+2 -2
View File
@@ -510,7 +510,7 @@ struct CliCommandHolder
~CliCommandHolder() { delete[] m_command; } ~CliCommandHolder() { delete[] m_command; }
}; };
typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap; typedef std::unordered_map<uint32, WorldSession*> SessionMap;
#define WORLD_SLEEP_CONST 10 #define WORLD_SLEEP_CONST 10
@@ -820,7 +820,7 @@ class World
SessionMap m_sessions; SessionMap m_sessions;
SessionMap m_offlineSessions; SessionMap m_offlineSessions;
typedef UNORDERED_MAP<uint32, time_t> DisconnectMap; typedef std::unordered_map<uint32, time_t> DisconnectMap;
DisconnectMap m_disconnects; DisconnectMap m_disconnects;
uint32 m_maxActiveSessionCount; uint32 m_maxActiveSessionCount;
uint32 m_maxQueuedSessionCount; uint32 m_maxQueuedSessionCount;
@@ -478,7 +478,7 @@ public:
uint64 StomachEnterTarget; uint64 StomachEnterTarget;
//Stomach map, bool = true then in stomach //Stomach map, bool = true then in stomach
UNORDERED_MAP<uint64, bool> Stomach_Map; std::unordered_map<uint64, bool> Stomach_Map;
void Reset() void Reset()
{ {
@@ -531,7 +531,7 @@ public:
if (Stomach_Map.empty()) if (Stomach_Map.empty())
return NULL; return NULL;
UNORDERED_MAP<uint64, bool>::const_iterator i = Stomach_Map.begin(); std::unordered_map<uint64, bool>::const_iterator i = Stomach_Map.begin();
std::list<Unit*> temp; std::list<Unit*> temp;
std::list<Unit*>::const_iterator j; std::list<Unit*>::const_iterator j;
@@ -675,7 +675,7 @@ public:
DoCast(me, SPELL_PURPLE_COLORATION, true); DoCast(me, SPELL_PURPLE_COLORATION, true);
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin(); std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
//Kick all players out of stomach //Kick all players out of stomach
while (i != Stomach_Map.end()) while (i != Stomach_Map.end())
@@ -707,7 +707,7 @@ public:
if (StomachAcidTimer <= diff) if (StomachAcidTimer <= diff)
{ {
//Apply aura to all players in stomach //Apply aura to all players in stomach
UNORDERED_MAP<uint64, bool>::iterator i = Stomach_Map.begin(); std::unordered_map<uint64, bool>::iterator i = Stomach_Map.begin();
while (i != Stomach_Map.end()) while (i != Stomach_Map.end())
{ {