diff --git a/Minecraft.Client/GameState/Settings.h b/Minecraft.Client/GameState/Settings.h index b6a2c0181..68a4fa8bd 100644 --- a/Minecraft.Client/GameState/Settings.h +++ b/Minecraft.Client/GameState/Settings.h @@ -7,7 +7,7 @@ class Settings // public static Logger logger = Logger.getLogger("Minecraft"); // private Properties properties = new Properties(); private: - unordered_map properties; // 4J - TODO was Properties type, will need to implement something we can serialise/deserialise too + std::unordered_map properties; // 4J - TODO was Properties type, will need to implement something we can serialise/deserialise too //File *file; public: diff --git a/Minecraft.Client/GameState/StatsCounter.cpp b/Minecraft.Client/GameState/StatsCounter.cpp index 562dcb63f..98062d16f 100644 --- a/Minecraft.Client/GameState/StatsCounter.cpp +++ b/Minecraft.Client/GameState/StatsCounter.cpp @@ -22,7 +22,7 @@ Stat** StatsCounter::LARGE_STATS[] = { &Stats::timePlayed }; -unordered_map StatsCounter::statBoards; +std::unordered_map StatsCounter::statBoards; StatsCounter::StatsCounter() { @@ -64,7 +64,7 @@ void StatsCounter::award(Stat* stat, unsigned int difficulty, unsigned int count requiresSave = true; //If this stat is on a leaderboard, mark that leaderboard as needing updated - unordered_map::iterator leaderboardEntry = statBoards.find(stat); + std::unordered_map::iterator leaderboardEntry = statBoards.find(stat); if( leaderboardEntry != statBoards.end() ) { app.DebugPrintf("[StatsCounter] award(): %X\n", leaderboardEntry->second << difficulty); diff --git a/Minecraft.Client/GameState/StatsCounter.h b/Minecraft.Client/GameState/StatsCounter.h index e292ccf27..d3e74b23a 100644 --- a/Minecraft.Client/GameState/StatsCounter.h +++ b/Minecraft.Client/GameState/StatsCounter.h @@ -28,7 +28,7 @@ private: } }; - typedef unordered_map StatsMap; + typedef std::unordered_map StatsMap; //static const int STAT_DATA_OFFSET = 32; static const int LARGE_STATS_COUNT = 8; @@ -69,7 +69,7 @@ private: int saveCounter; int modifiedBoards; - static unordered_map statBoards; + static std::unordered_map statBoards; int flushCounter; public: diff --git a/Minecraft.Client/GameState/StatsSyncer.h b/Minecraft.Client/GameState/StatsSyncer.h index 843505bf6..b3c9d0424 100644 --- a/Minecraft.Client/GameState/StatsSyncer.h +++ b/Minecraft.Client/GameState/StatsSyncer.h @@ -14,8 +14,8 @@ private: volatile bool busy; - volatile unordered_map *serverStats; - volatile unordered_map *failedSentStats; + volatile std::unordered_map *serverStats; + volatile std::unordered_map *failedSentStats; StatsCounter *statsCounter; File *unsentFile, *lastServerFile; @@ -29,18 +29,18 @@ public: StatsSyncher(User *user, StatsCounter *statsCounter, File *dir); private: void attemptRename(File *dir, const wstring& name, File *to); - unordered_map *loadStatsFromDisk(File *file, File *tmp, File *old); - unordered_map *loadStatsFromDisk(File *file); - void doSend(unordered_map *stats); - void doSave(unordered_map *stats, File *file, File *tmp, File *old); + std::unordered_map *loadStatsFromDisk(File *file, File *tmp, File *old); + std::unordered_map *loadStatsFromDisk(File *file); + void doSend(std::unordered_map *stats); + void doSave(std::unordered_map *stats, File *file, File *tmp, File *old); protected: - unordered_map *doGetStats(); + std::unordered_map *doGetStats(); public: void getStatsFromServer(); - void saveUnsent(unordered_map *stats); - void sendUnsent(unordered_map *stats, unordered_map *fullStats); - void forceSendUnsent(unordered_map *stats); - void forceSaveUnsent(unordered_map *stats); + void saveUnsent(std::unordered_map *stats); + void sendUnsent(std::unordered_map *stats, std::unordered_map *fullStats); + void forceSendUnsent(std::unordered_map *stats); + void forceSaveUnsent(std::unordered_map *stats); bool maySave(); bool maySend(); void tick(); diff --git a/Minecraft.Client/Level/MultiPlayerLevel.h b/Minecraft.Client/Level/MultiPlayerLevel.h index 5d0c8b4a1..bd84b0c48 100644 --- a/Minecraft.Client/Level/MultiPlayerLevel.h +++ b/Minecraft.Client/Level/MultiPlayerLevel.h @@ -54,7 +54,7 @@ public: void setChunkVisible(int x, int z, bool visible); private: - unordered_map, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap + std::unordered_map, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap unordered_set > forced; unordered_set > reEntries; diff --git a/Minecraft.Client/Level/ServerLevel.h b/Minecraft.Client/Level/ServerLevel.h index 81ca5f475..c4dd4f5ec 100644 --- a/Minecraft.Client/Level/ServerLevel.h +++ b/Minecraft.Client/Level/ServerLevel.h @@ -90,7 +90,7 @@ public: private: void saveLevelData(); - typedef unordered_map , IntKeyHash2, IntKeyEq> intEntityMap; + typedef std::unordered_map , IntKeyHash2, IntKeyEq> intEntityMap; intEntityMap entitiesById; // 4J - was IntHashMap, using same hashing function as this uses protected: virtual void entityAdded(std::shared_ptr e); diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index e372bbba8..ba23a4daf 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -64,7 +64,7 @@ int MinecraftServer::s_slowQueuePlayerIndex = 0; int MinecraftServer::s_slowQueueLastTime = 0; bool MinecraftServer::s_slowQueuePacketSent = false; -unordered_map MinecraftServer::ironTimers; +std::unordered_map MinecraftServer::ironTimers; MinecraftServer::MinecraftServer() { diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h index 992bb7942..7bbd01dbf 100644 --- a/Minecraft.Client/MinecraftServer.h +++ b/Minecraft.Client/MinecraftServer.h @@ -64,7 +64,7 @@ public: static const int TICK_STATS_SPAN = SharedConstants::TICKS_PER_SECOND * 5; // static Logger logger = Logger.getLogger("Minecraft"); - static unordered_map ironTimers; + static std::unordered_map ironTimers; private: static const int DEFAULT_MINECRAFT_PORT = 25565; diff --git a/Minecraft.Client/Network/PlayerChunkMap.h b/Minecraft.Client/Network/PlayerChunkMap.h index 17dd95a10..2b7f9a767 100644 --- a/Minecraft.Client/Network/PlayerChunkMap.h +++ b/Minecraft.Client/Network/PlayerChunkMap.h @@ -66,7 +66,7 @@ public: vector > players; void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added private: - unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap + std::unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap vector changedChunks; vector addRequests; // 4J added void tickAddRequests(std::shared_ptr player); // 4J added diff --git a/Minecraft.Client/Network/PlayerConnection.h b/Minecraft.Client/Network/PlayerConnection.h index daa8926d6..bc3c376aa 100644 --- a/Minecraft.Client/Network/PlayerConnection.h +++ b/Minecraft.Client/Network/PlayerConnection.h @@ -78,7 +78,7 @@ public: virtual void handleContainerClose(std::shared_ptr packet); private: - unordered_map expectedAcks; + std::unordered_map expectedAcks; public: // 4J Stu - Handlers only valid in debug mode diff --git a/Minecraft.Client/Platform/Durango/ApplicationView.cpp b/Minecraft.Client/Platform/Durango/ApplicationView.cpp index 073d7ba90..2442abb91 100644 --- a/Minecraft.Client/Platform/Durango/ApplicationView.cpp +++ b/Minecraft.Client/Platform/Durango/ApplicationView.cpp @@ -27,7 +27,7 @@ XALLOC_ATTRIBUTES ExpandAllocAttributes( _In_ LONGLONG dwAttributes ) } SIZE_T totalTracked = 0; -unordered_map tracker; +std::unordered_map tracker; static volatile bool memDump = false; static volatile bool memReset = false; static bool memDumpInit = false; diff --git a/Minecraft.Client/Platform/Durango/Durango_App.cpp b/Minecraft.Client/Platform/Durango/Durango_App.cpp index bf485af60..7d2c5468b 100644 --- a/Minecraft.Client/Platform/Durango/Durango_App.cpp +++ b/Minecraft.Client/Platform/Durango/Durango_App.cpp @@ -169,7 +169,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType) int CConsoleMinecraftApp::LoadLocalDLCImages() { - unordered_map *pDLCInfoA=app.GetDLCInfo(); + std::unordered_map *pDLCInfoA=app.GetDLCInfo(); // 4J-PB - Any local graphic files for the Minecraft Store? for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ ) { @@ -183,7 +183,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImages() void CConsoleMinecraftApp::FreeLocalDLCImages() { // 4J-PB - Any local graphic files for the Minecraft Store? - unordered_map *pDLCInfoA=app.GetDLCInfo(); + std::unordered_map *pDLCInfoA=app.GetDLCInfo(); for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ ) { diff --git a/Minecraft.Client/Platform/Durango/Durango_Minecraft.cpp b/Minecraft.Client/Platform/Durango/Durango_Minecraft.cpp index cdebb44a3..f3e4888f3 100644 --- a/Minecraft.Client/Platform/Durango/Durango_Minecraft.cpp +++ b/Minecraft.Client/Platform/Durango/Durango_Minecraft.cpp @@ -984,7 +984,7 @@ void oldWinMainTick() #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h index 9daa7322a..dc4929852 100644 --- a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h +++ b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h @@ -397,7 +397,7 @@ private: bool m_notifyForFullParty; - unordered_map m_sessionAddressToConnectionInfoMapHost; // For host - there may be more than one remote session attached to this listening session + std::unordered_map m_sessionAddressToConnectionInfoMapHost; // For host - there may be more than one remote session attached to this listening session unsigned int m_sessionAddressFromSmallId[256]; // For host - for mapping back from small Id, to session address unsigned char m_channelFromSmallId[256]; // For host and client, for mapping back from small Id, to channel DQRConnectionInfo m_connectionInfoClient; // For client diff --git a/Minecraft.Client/Platform/Durango/Sentient/DurangoTelemetry.h b/Minecraft.Client/Platform/Durango/Sentient/DurangoTelemetry.h index 7bf43acb7..6378b4750 100644 --- a/Minecraft.Client/Platform/Durango/Sentient/DurangoTelemetry.h +++ b/Minecraft.Client/Platform/Durango/Sentient/DurangoTelemetry.h @@ -9,7 +9,7 @@ class CDurangoTelemetryManager : public CTelemetryManager public: static GUID ZERO_GUID; - unordered_map m_multiplayerRoundStartTimes; + std::unordered_map m_multiplayerRoundStartTimes; CDurangoTelemetryManager(); diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 350a5cf91..3ad7d9b3c 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -1037,7 +1037,7 @@ void FreeRichPresenceStrings() #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/Orbis/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Platform/Orbis/4JLibs/inc/4J_Storage.h index d4d845dfa..f586df2cb 100644 --- a/Minecraft.Client/Platform/Orbis/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Platform/Orbis/4JLibs/inc/4J_Storage.h @@ -405,7 +405,7 @@ public: void SetDLCProductCode(const char* szProductCode); void SetProductUpgradeKey(const char* szKey); bool CheckForTrialUpgradeKey(void( *Func)(LPVOID, bool),LPVOID lpParam); - void SetDLCInfoMap(unordered_map* pSONYDLCMap); + void SetDLCInfoMap(std::unordered_map* pSONYDLCMap); }; extern C4JStorage StorageManager; diff --git a/Minecraft.Client/Platform/Orbis/Orbis_App.cpp b/Minecraft.Client/Platform/Orbis/Orbis_App.cpp index fcea61cf8..77c82c98c 100644 --- a/Minecraft.Client/Platform/Orbis/Orbis_App.cpp +++ b/Minecraft.Client/Platform/Orbis/Orbis_App.cpp @@ -288,7 +288,7 @@ int CConsoleMinecraftApp::GetLocalTMSFileIndex(WCHAR *wchTMSFile,bool bFilenameI int CConsoleMinecraftApp::LoadLocalDLCImages() { // 4J-PB - Any local graphic files for the Minecraft Store? - unordered_map*pDLCInfoA=app.GetSonyDLCMap(); + std::unordered_map*pDLCInfoA=app.GetSonyDLCMap(); for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ ) { SONYDLC * pDLCInfo=(*it).second; @@ -301,7 +301,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImages() void CConsoleMinecraftApp::FreeLocalDLCImages() { // 4J-PB - Any local graphic files for the Minecraft Store? - unordered_map*pDLCInfoA=app.GetSonyDLCMap(); + std::unordered_map*pDLCInfoA=app.GetSonyDLCMap(); for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ ) { SONYDLC * pDLCInfo=(*it).second; diff --git a/Minecraft.Client/Platform/Orbis/Orbis_App.h b/Minecraft.Client/Platform/Orbis/Orbis_App.h index fc3c953d9..6fc6f060b 100644 --- a/Minecraft.Client/Platform/Orbis/Orbis_App.h +++ b/Minecraft.Client/Platform/Orbis/Orbis_App.h @@ -161,7 +161,7 @@ public: bool DLCAlreadyPurchased(char *pchTitle); char *GetSkuIDFromProductList(); void GetDLCSkuIDFromProductList(char *,char *); - unordered_map* GetSonyDLCMap() { return &m_SONYDLCMap; } + std::unordered_map* GetSonyDLCMap() { return &m_SONYDLCMap; } static void CommerceInitCallback(LPVOID lpParam,int err); static void CommerceGetCategoriesCallback(LPVOID lpParam,int err); static void CommerceGetProductListCallback(LPVOID lpParam,int err); @@ -210,7 +210,7 @@ private: // SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed; PRODUCTCODES ProductCodes; - unordered_map m_SONYDLCMap; + std::unordered_map m_SONYDLCMap; bool m_bVoiceChatAndUGCRestricted; diff --git a/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp b/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp index c0991c427..a8ce1cd0e 100644 --- a/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp +++ b/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp @@ -1509,7 +1509,7 @@ void FreeRichPresenceStrings() #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/PS3/Network/SQRNetworkManager_PS3.h b/Minecraft.Client/Platform/PS3/Network/SQRNetworkManager_PS3.h index 94080f4f6..60eb10083 100644 --- a/Minecraft.Client/Platform/PS3/Network/SQRNetworkManager_PS3.h +++ b/Minecraft.Client/Platform/PS3/Network/SQRNetworkManager_PS3.h @@ -205,7 +205,7 @@ private: unsigned int m_searchResultCount; // Rudp management and local players - unordered_map m_RudpCtxToPlayerMap; + std::unordered_map m_RudpCtxToPlayerMap; bool CreateRudpConnections(SceNpMatching2RoomId roomId, SceNpMatching2RoomMemberId peerMemberId, int playerMask, SceNpMatching2RoomMemberId playersPeerMemberId); SQRNetworkPlayer *GetPlayerFromRudpCtx(int rudpCtx); SQRNetworkPlayer *GetPlayerFromRoomMemberAndLocalIdx(int roomMember, int localIdx); diff --git a/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.cpp b/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.cpp index 27011ac06..93cc0d5b3 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.cpp +++ b/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.cpp @@ -37,7 +37,7 @@ bool SonyVoiceChat::sm_bEnabled = true; uint8_t SonyVoiceChat::sm_micStatus = CELL_AVC2_MIC_STATUS_UNKNOWN; bool SonyVoiceChat::sm_bLoaded = false; bool SonyVoiceChat::sm_bUnloading = false; -unordered_map SonyVoiceChat::sm_bTalkingMap; +std::unordered_map SonyVoiceChat::sm_bTalkingMap; bool SonyVoiceChat::sm_bCanStart = false; bool SonyVoiceChat::sm_isChatRestricted = false; int SonyVoiceChat::sm_currentBitrate = 28000; diff --git a/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.h b/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.h index ae68b55d1..e07d109f1 100644 --- a/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.h +++ b/Minecraft.Client/Platform/PS3/Network/SonyVoiceChat.h @@ -117,7 +117,7 @@ private: static uint8_t sm_micStatus; static bool sm_bLoaded; static bool sm_bUnloading; - static unordered_map sm_bTalkingMap; + static std::unordered_map sm_bTalkingMap; static bool sm_bCanStart; // set to true on init, false on disconnect, used to see if we should start after a re-enable static bool sm_isChatRestricted; // true if the parental controls have been set on the main users account static int sm_currentBitrate; diff --git a/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Types.h b/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Types.h index ccdacff9b..241651364 100644 --- a/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Types.h +++ b/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Types.h @@ -10,7 +10,7 @@ #include #include #include -#include "boost_1_53_0/boost/tr1/unordered_map.hpp" +#include "boost_1_53_0/boost/tr1/std::unordered_map.hpp" #include "boost_1_53_0/boost/tr1/unordered_set.hpp" #include "boost_1_53_0/boost/pool/pool_alloc.hpp" #include @@ -29,18 +29,18 @@ using std::tr1::std::shared_ptr; using std::tr1::static_pointer_cast; using std::tr1::swap; using std::tr1::weak_ptr; -using std::tr1::unordered_map; +using std::tr1::std::unordered_map; using std::tr1::unordered_set; using boost::hash; -// user the pool_allocator for all unordered_set and unordered_map instances +// user the pool_allocator for all unordered_set and std::unordered_map instances // template < class T, class H = hash, class P = std::equal_to, class A = boost::pool_allocator > // class unordered_set : public std::tr1::unordered_set // {}; // // template , class P = std::equal_to, class A = boost::pool_allocator > > -// class unordered_map : public std::tr1::unordered_map +// class std::unordered_map : public std::tr1::std::unordered_map // {}; @@ -50,7 +50,7 @@ using boost::hash; // {}; // // template , class P = std::equal_to, class A = C4JPoolAllocator > > -// class unordered_map : public std::tr1::unordered_map +// class std::unordered_map : public std::tr1::std::unordered_map // {}; diff --git a/Minecraft.Client/Platform/PS3/PS3_App.h b/Minecraft.Client/Platform/PS3/PS3_App.h index 48d05cdc5..4b6a79830 100644 --- a/Minecraft.Client/Platform/PS3/PS3_App.h +++ b/Minecraft.Client/Platform/PS3/PS3_App.h @@ -202,7 +202,7 @@ private: // SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed; PRODUCTCODES ProductCodes; - unordered_map m_SONYDLCMap; + std::unordered_map m_SONYDLCMap; bool m_bVoiceChatAndUGCRestricted; diff --git a/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp b/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp index 50526d9f3..c413f1feb 100644 --- a/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp +++ b/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp @@ -1388,7 +1388,7 @@ void FreeRichPresenceStrings() #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/PS3/Xbox_Minecraft.cpp b/Minecraft.Client/Platform/PS3/Xbox_Minecraft.cpp index 441c14c7c..25686b529 100644 --- a/Minecraft.Client/Platform/PS3/Xbox_Minecraft.cpp +++ b/Minecraft.Client/Platform/PS3/Xbox_Minecraft.cpp @@ -1002,7 +1002,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/PSVita/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Platform/PSVita/4JLibs/inc/4J_Storage.h index ecd4dbc3b..552c247d4 100644 --- a/Minecraft.Client/Platform/PSVita/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Platform/PSVita/4JLibs/inc/4J_Storage.h @@ -381,7 +381,7 @@ public: void SetDLCProductCode(const char* szProductCode); void SetProductUpgradeKey(const char* szKey); bool CheckForTrialUpgradeKey(void( *Func)(LPVOID, bool),LPVOID lpParam); - void SetDLCInfoMap(unordered_map* pSONYDLCMap); + void SetDLCInfoMap(std::unordered_map* pSONYDLCMap); void EntitlementsCallback(bool bFoundEntitlements); }; diff --git a/Minecraft.Client/Platform/PSVita/PSVita_App.h b/Minecraft.Client/Platform/PSVita/PSVita_App.h index fa3f7ab38..2e317bfca 100644 --- a/Minecraft.Client/Platform/PSVita/PSVita_App.h +++ b/Minecraft.Client/Platform/PSVita/PSVita_App.h @@ -159,7 +159,7 @@ public: bool DLCAlreadyPurchased(char *pchTitle); char *GetSkuIDFromProductList(); void GetDLCSkuIDFromProductList(char *,char *); - unordered_map* GetSonyDLCMap() { return &m_SONYDLCMap; } + std::unordered_map* GetSonyDLCMap() { return &m_SONYDLCMap; } static void CommerceInitCallback(LPVOID lpParam,int err); static void CommerceGetCategoriesCallback(LPVOID lpParam,int err); static void CommerceGetProductListCallback(LPVOID lpParam,int err); @@ -230,7 +230,7 @@ private: // SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed; PRODUCTCODES ProductCodes; - unordered_map m_SONYDLCMap; + std::unordered_map m_SONYDLCMap; bool m_bVoiceChatAndUGCRestricted; diff --git a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp index c5034bcbf..97fa93d53 100644 --- a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp @@ -1168,7 +1168,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.cpp b/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.cpp index fd2cf1175..dc95f4968 100644 --- a/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.cpp +++ b/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.cpp @@ -321,7 +321,7 @@ HRESULT XUI_FontData::Create( int iFontTexture, const VOID* pFontData ) for( unsigned short i = 0; i < m_cMaxGlyph + 1; ++i ) { if( translatorTable[i] == 0 ) continue; - m_TranslatorMap.insert( unordered_map::value_type(i, translatorTable[i]) ); + m_TranslatorMap.insert( std::unordered_map::value_type(i, translatorTable[i]) ); } pData += ATGCALCFONTFILEHEADERSIZE( m_cMaxGlyph + 1 ); diff --git a/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.h b/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.h index b654ab4a7..98b30d822 100644 --- a/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.h +++ b/Minecraft.Client/Platform/Xbox/Font/XUI_FontData.h @@ -106,7 +106,7 @@ public: int m_iFontTexture; private: - unordered_map m_TranslatorMap; + std::unordered_map m_TranslatorMap; CharMetrics *m_characterMetrics; diff --git a/Minecraft.Client/Platform/Xbox/Font/XUI_FontRenderer.h b/Minecraft.Client/Platform/Xbox/Font/XUI_FontRenderer.h index cffe2ed1a..5f3e80494 100644 --- a/Minecraft.Client/Platform/Xbox/Font/XUI_FontRenderer.h +++ b/Minecraft.Client/Platform/Xbox/Font/XUI_FontRenderer.h @@ -24,7 +24,7 @@ protected: // The XUI_Font is a temporary instance that is around as long as XUI needs it, but does the actual rendering // These can be chained - unordered_map m_loadedFonts[eFontData_MAX]; + std::unordered_map m_loadedFonts[eFontData_MAX]; public: XUI_FontRenderer(); diff --git a/Minecraft.Client/Platform/Xbox/Xbox_Minecraft.cpp b/Minecraft.Client/Platform/Xbox/Xbox_Minecraft.cpp index 808387923..589fcc0f1 100644 --- a/Minecraft.Client/Platform/Xbox/Xbox_Minecraft.cpp +++ b/Minecraft.Client/Platform/Xbox/Xbox_Minecraft.cpp @@ -888,7 +888,7 @@ void SetRenderAndSamplerStates(IDirect3DDevice9 *pDevice,DWORD *RenderStateA,DWO #ifdef MEMORY_TRACKING int totalAllocGen = 0; -unordered_map allocCounts; +std::unordered_map allocCounts; bool trackEnable = false; bool trackStarted = false; volatile size_t sizeCheckMin = 1160; diff --git a/Minecraft.Client/Player/EntityTracker.h b/Minecraft.Client/Player/EntityTracker.h index b35b5efef..57ca99be0 100644 --- a/Minecraft.Client/Player/EntityTracker.h +++ b/Minecraft.Client/Player/EntityTracker.h @@ -14,7 +14,7 @@ class EntityTracker private: ServerLevel *level; unordered_set > entities; - unordered_map , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap + std::unordered_map , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap int maxRange; public: diff --git a/Minecraft.Client/Player/ServerPlayer.cpp b/Minecraft.Client/Player/ServerPlayer.cpp index 26949313b..7e4bcaf6a 100644 --- a/Minecraft.Client/Player/ServerPlayer.cpp +++ b/Minecraft.Client/Player/ServerPlayer.cpp @@ -369,7 +369,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) okToSend = true; MinecraftServer::s_slowQueuePacketSent = true; -// static unordered_map mapLastTime; +// static std::unordered_map mapLastTime; // __int64 thisTime = System::currentTimeMillis(); // __int64 lastTime = mapLastTime[connection->getNetworkPlayer()->GetUID().toString()]; // app.DebugPrintf(" - OK to send (%d ms since last)\n", thisTime - lastTime); diff --git a/Minecraft.Client/Rendering/EntityRenderers/EntityRenderDispatcher.h b/Minecraft.Client/Rendering/EntityRenderers/EntityRenderDispatcher.h index f68c43695..eb443cee7 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/EntityRenderDispatcher.h +++ b/Minecraft.Client/Rendering/EntityRenderers/EntityRenderDispatcher.h @@ -10,7 +10,7 @@ class EntityRenderDispatcher public: static void staticCtor(); // 4J added private: - typedef unordered_map classToRendererMap; + typedef std::unordered_map classToRendererMap; classToRendererMap renderers; // 4J - was: // Map, EntityRenderer> renderers = new HashMap, EntityRenderer>(); diff --git a/Minecraft.Client/Rendering/EntityRenderers/MobSpawnerRenderer.h b/Minecraft.Client/Rendering/EntityRenderers/MobSpawnerRenderer.h index c8b392adf..c367e9b03 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/MobSpawnerRenderer.h +++ b/Minecraft.Client/Rendering/EntityRenderers/MobSpawnerRenderer.h @@ -5,7 +5,7 @@ using namespace std; class MobSpawnerRenderer : public TileEntityRenderer { private: - unordered_map > models; + std::unordered_map > models; public: virtual void render(std::shared_ptr _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/Rendering/EntityRenderers/TileEntityRenderDispatcher.h b/Minecraft.Client/Rendering/EntityRenderers/TileEntityRenderDispatcher.h index f8412860e..01eaa3652 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/TileEntityRenderDispatcher.h +++ b/Minecraft.Client/Rendering/EntityRenderers/TileEntityRenderDispatcher.h @@ -12,7 +12,7 @@ public: static void staticCtor(); // 4J added private: - typedef unordered_map classToTileRendererMap; + typedef std::unordered_map classToTileRendererMap; classToTileRendererMap renderers; public: diff --git a/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.h b/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.h index ec369939c..34f926a7e 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.h +++ b/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.h @@ -46,7 +46,7 @@ class TileRenderer bool smoothShapeLighting; Minecraft *minecraft; ///////////////////////////////////////// Data caching - unordered_map getLightColorCount; + std::unordered_map getLightColorCount; int xMin, yMin, zMin; int xMin2, yMin2, zMin2; int getLightColor( Tile *tt, LevelSource *level, int x, int y, int z); diff --git a/Minecraft.Client/Rendering/LevelRenderer.cpp b/Minecraft.Client/Rendering/LevelRenderer.cpp index 215b16fe3..3eaa843fb 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.cpp +++ b/Minecraft.Client/Rendering/LevelRenderer.cpp @@ -3216,7 +3216,7 @@ void LevelRenderer::destroyTileProgress(int id, int x, int y, int z, int progres if (entry == NULL || entry->getX() != x || entry->getY() != y || entry->getZ() != z) { entry = new BlockDestructionProgress(id, x, y, z); - destroyingBlocks.insert( unordered_map::value_type(id, entry) ); + destroyingBlocks.insert( std::unordered_map::value_type(id, entry) ); } entry->setProgress(progress); diff --git a/Minecraft.Client/Rendering/LevelRenderer.h b/Minecraft.Client/Rendering/LevelRenderer.h index 780e13b7a..b456752e3 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.h +++ b/Minecraft.Client/Rendering/LevelRenderer.h @@ -120,7 +120,7 @@ public: void destroyTileProgress(int id, int x, int y, int z, int progress); void registerTextures(IconRegister *iconRegister); - typedef unordered_map >, IntKeyHash, IntKeyEq> rteMap; + typedef std::unordered_map >, IntKeyHash, IntKeyEq> rteMap; private: // debug @@ -160,7 +160,7 @@ private: static const int RENDERLISTS_LENGTH = 4; // 4J - added OffsettedRenderList renderLists[RENDERLISTS_LENGTH]; - unordered_map destroyingBlocks; + std::unordered_map destroyingBlocks; Icon **breakingTextures; public: diff --git a/Minecraft.Client/Rendering/Models/Model.h b/Minecraft.Client/Rendering/Models/Model.h index 2762d9124..bb474e98c 100644 --- a/Minecraft.Client/Rendering/Models/Model.h +++ b/Minecraft.Client/Rendering/Models/Model.h @@ -14,7 +14,7 @@ public: bool riding; vector cubes; bool young; - unordered_map mappedTexOffs; + std::unordered_map mappedTexOffs; int texWidth; int texHeight; diff --git a/Minecraft.Client/Textures/Packs/TexturePackRepository.h b/Minecraft.Client/Textures/Packs/TexturePackRepository.h index 2b66df43b..922b440de 100644 --- a/Minecraft.Client/Textures/Packs/TexturePackRepository.h +++ b/Minecraft.Client/Textures/Packs/TexturePackRepository.h @@ -21,7 +21,7 @@ private: vector *texturePacks; vector m_texturePacksToDelete; - unordered_map cacheById; + std::unordered_map cacheById; TexturePack *selected; TexturePack *lastSelected; diff --git a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp index 68ad93421..cc024b19a 100644 --- a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp @@ -70,7 +70,7 @@ void PreStitchedTextureMap::stitch() } // Collection bucket for multiple frames per texture - unordered_map * > textures; // = new HashMap>(); + std::unordered_map * > textures; // = new HashMap>(); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); diff --git a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h index 6e6ea0870..aab22ffab 100644 --- a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h +++ b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h @@ -23,7 +23,7 @@ private: bool m_mipMap; - typedef unordered_map stringIconMap; + typedef std::unordered_map stringIconMap; stringIconMap texturesByName; // = new HashMap(); BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); StitchedTexture *missingPosition; diff --git a/Minecraft.Client/Textures/Stitching/TextureMap.cpp b/Minecraft.Client/Textures/Stitching/TextureMap.cpp index 2a7c6c59c..8277da0ec 100644 --- a/Minecraft.Client/Textures/Stitching/TextureMap.cpp +++ b/Minecraft.Client/Textures/Stitching/TextureMap.cpp @@ -58,7 +58,7 @@ void TextureMap::stitch() } // Collection bucket for multiple frames per texture - unordered_map * > textures; // = new HashMap>(); + std::unordered_map * > textures; // = new HashMap>(); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); @@ -76,7 +76,7 @@ void TextureMap::stitch() stitcher->addTexture(missingHolder); vector *missingVec = new vector(); missingVec->push_back(missingTex); - textures.insert( unordered_map * >::value_type( missingHolder, missingVec )); + textures.insert( std::unordered_map * >::value_type( missingHolder, missingVec )); // Extract frames from textures and add them to the stitchers //for (final String name : texturesToRegister.keySet()) @@ -98,7 +98,7 @@ void TextureMap::stitch() stitcher->addTexture(holder); // Store frames - textures.insert( unordered_map * >::value_type( holder, frames ) ); + textures.insert( std::unordered_map * >::value_type( holder, frames ) ); } // Stitch! diff --git a/Minecraft.Client/Textures/Stitching/TextureMap.h b/Minecraft.Client/Textures/Stitching/TextureMap.h index 99de21477..173dd15e1 100644 --- a/Minecraft.Client/Textures/Stitching/TextureMap.h +++ b/Minecraft.Client/Textures/Stitching/TextureMap.h @@ -21,7 +21,7 @@ private: bool m_mipMap; - typedef unordered_map stringStitchedTextureMap; + typedef std::unordered_map stringStitchedTextureMap; stringStitchedTextureMap texturesByName; // = new HashMap(); BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); StitchedTexture *missingPosition; diff --git a/Minecraft.Client/Textures/TextureManager.h b/Minecraft.Client/Textures/TextureManager.h index b1d71d2db..f62209cb6 100644 --- a/Minecraft.Client/Textures/TextureManager.h +++ b/Minecraft.Client/Textures/TextureManager.h @@ -10,8 +10,8 @@ private: static TextureManager *instance; int nextID; - typedef unordered_map stringIntMap; - typedef unordered_map intTextureMap; + typedef std::unordered_map stringIntMap; + typedef std::unordered_map intTextureMap; intTextureMap idToTextureMap; stringIntMap stringToIDMap; diff --git a/Minecraft.Client/Textures/Textures.cpp b/Minecraft.Client/Textures/Textures.cpp index 416bb95cd..8df6b23cc 100644 --- a/Minecraft.Client/Textures/Textures.cpp +++ b/Minecraft.Client/Textures/Textures.cpp @@ -1139,27 +1139,27 @@ void Textures::reloadAll() #if 0 AUTO_VAR(itEndLI, loadedImages.end() ); - for(unordered_map::iterator it = loadedImages.begin(); it != itEndLI; it++ ) + for(std::unordered_map::iterator it = loadedImages.begin(); it != itEndLI; it++ ) { BufferedImage *image = it->second; loadTexture(image, it->first); } AUTO_VAR(itEndHT, httpTextures.end()); - for(unordered_map::iterator it = httpTextures.begin(); it != itEndHT; it++ ) + for(std::unordered_map::iterator it = httpTextures.begin(); it != itEndHT; it++ ) { it->second->isLoaded = false; } AUTO_VAR(itEndMT, memTextures.end()); - for(unordered_map::iterator it = memTextures.begin(); it != itEndMT; it++ ) + for(std::unordered_map::iterator it = memTextures.begin(); it != itEndMT; it++ ) { it->second->isLoaded = false; } AUTO_VAR(itEndIM, idMap.end()); - for( unordered_map::iterator it = idMap.begin(); it != itEndIM; it++ ) + for( std::unordered_map::iterator it = idMap.begin(); it != itEndIM; it++ ) { wstring name = it->first; @@ -1180,7 +1180,7 @@ void Textures::reloadAll() delete image; } AUTO_VAR(itEndPM, pixelsMap.end()); - for( unordered_map::iterator it = pixelsMap.begin(); it != itEndPM; it++ ) + for( std::unordered_map::iterator it = pixelsMap.begin(); it != itEndPM; it++ ) { wstring name = it->first; BufferedImage *image = readImage(skin->getResource(name)); diff --git a/Minecraft.Client/Textures/Textures.h b/Minecraft.Client/Textures/Textures.h index e032f4d97..afd0564f4 100644 --- a/Minecraft.Client/Textures/Textures.h +++ b/Minecraft.Client/Textures/Textures.h @@ -208,14 +208,14 @@ private: static const wchar_t *preLoaded[TN_COUNT]; static int preLoadedIdx[TN_COUNT]; - unordered_map idMap; - unordered_map pixelsMap; - unordered_map loadedImages; + std::unordered_map idMap; + std::unordered_map pixelsMap; + std::unordered_map loadedImages; //IntBuffer *pixels; // 4J - removed so we don't have a permanent buffer kicking round using up 1MB - unordered_map httpTextures; + std::unordered_map httpTextures; // 4J-PB - Added for GTS textures - unordered_map memTextures; + std::unordered_map memTextures; Options *options; private: diff --git a/Minecraft.Client/Utils/ArchiveFile.h b/Minecraft.Client/Utils/ArchiveFile.h index db20484c0..f67c25b99 100644 --- a/Minecraft.Client/Utils/ArchiveFile.h +++ b/Minecraft.Client/Utils/ArchiveFile.h @@ -23,7 +23,7 @@ protected: } MetaData, *PMetaData; - unordered_map m_index; + std::unordered_map m_index; public: void _readHeader(DataInputStream *dis); diff --git a/Minecraft.Client/Utils/MemoryTracker.cpp b/Minecraft.Client/Utils/MemoryTracker.cpp index 581198708..9300586b9 100644 --- a/Minecraft.Client/Utils/MemoryTracker.cpp +++ b/Minecraft.Client/Utils/MemoryTracker.cpp @@ -4,7 +4,7 @@ #include "../../Minecraft.World/IO/Streams/ByteBuffer.h" #include "../../Minecraft.World/IO/Streams/FloatBuffer.h" -unordered_map MemoryTracker::GL_LIST_IDS; +std::unordered_map MemoryTracker::GL_LIST_IDS; vector MemoryTracker::TEXTURE_IDS; int MemoryTracker::genLists(int count) diff --git a/Minecraft.Client/Utils/MemoryTracker.h b/Minecraft.Client/Utils/MemoryTracker.h index 9567fac9d..c3dc337f3 100644 --- a/Minecraft.Client/Utils/MemoryTracker.h +++ b/Minecraft.Client/Utils/MemoryTracker.h @@ -12,7 +12,7 @@ using namespace std; class MemoryTracker { private: - static unordered_map GL_LIST_IDS; + static std::unordered_map GL_LIST_IDS; static vector TEXTURE_IDS; public: diff --git a/Minecraft.Client/Utils/StringTable.cpp b/Minecraft.Client/Utils/StringTable.cpp index 7473ac7a2..68764957a 100644 --- a/Minecraft.Client/Utils/StringTable.cpp +++ b/Minecraft.Client/Utils/StringTable.cpp @@ -87,7 +87,7 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize) wstring stringId = dis2.readUTF(); wstring stringValue = dis2.readUTF(); - m_stringsMap.insert( unordered_map::value_type(stringId, stringValue) ); + m_stringsMap.insert( std::unordered_map::value_type(stringId, stringValue) ); } } else diff --git a/Minecraft.Client/Utils/StringTable.h b/Minecraft.Client/Utils/StringTable.h index 9e27d65ce..5cb379b99 100644 --- a/Minecraft.Client/Utils/StringTable.h +++ b/Minecraft.Client/Utils/StringTable.h @@ -15,7 +15,7 @@ class StringTable private: bool isStatic; - unordered_map m_stringsMap; + std::unordered_map m_stringsMap; vector m_stringsVec; byteArray src; diff --git a/Minecraft.Client/Utils/WstringLookup.h b/Minecraft.Client/Utils/WstringLookup.h index 50501020f..45f92dc52 100644 --- a/Minecraft.Client/Utils/WstringLookup.h +++ b/Minecraft.Client/Utils/WstringLookup.h @@ -6,7 +6,7 @@ class WstringLookup { private: UINT numIDs; - unordered_map str2int; + std::unordered_map str2int; vector int2str; public: diff --git a/Minecraft.World/AI/Navigation/PathFinder.cpp b/Minecraft.World/AI/Navigation/PathFinder.cpp index 16de2fb84..a91d36570 100644 --- a/Minecraft.World/AI/Navigation/PathFinder.cpp +++ b/Minecraft.World/AI/Navigation/PathFinder.cpp @@ -193,7 +193,7 @@ Node *PathFinder::getNode(Entity *entity, int x, int y, int z, Node *size, int j MemSect(54); node = new Node(x, y, z); MemSect(0); - nodes.insert( unordered_map::value_type(i, node) ); + nodes.insert( std::unordered_map::value_type(i, node) ); } else { diff --git a/Minecraft.World/AI/Navigation/PathFinder.h b/Minecraft.World/AI/Navigation/PathFinder.h index fea2810ba..119e8afa0 100644 --- a/Minecraft.World/AI/Navigation/PathFinder.h +++ b/Minecraft.World/AI/Navigation/PathFinder.h @@ -12,7 +12,7 @@ private: BinaryHeap openSet; // 4J Jev, was a IntHashMap, thought this was close enough. - unordered_map nodes; + std::unordered_map nodes; NodeArray *neighbors; diff --git a/Minecraft.World/Blocks/MobSpawner.cpp b/Minecraft.World/Blocks/MobSpawner.cpp index fd199aafe..36e7e248f 100644 --- a/Minecraft.World/Blocks/MobSpawner.cpp +++ b/Minecraft.World/Blocks/MobSpawner.cpp @@ -36,7 +36,7 @@ TilePos MobSpawner::getRandomPosWithin(Level *level, int cx, int cz) // AP - See CustomMap.h for an explanation of this CustomMap MobSpawner::chunksToPoll; #else - unordered_map MobSpawner::chunksToPoll; + std::unordered_map MobSpawner::chunksToPoll; #endif const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFriendlies) diff --git a/Minecraft.World/Blocks/MobSpawner.h b/Minecraft.World/Blocks/MobSpawner.h index 173e03852..a46ba1618 100644 --- a/Minecraft.World/Blocks/MobSpawner.h +++ b/Minecraft.World/Blocks/MobSpawner.h @@ -22,7 +22,7 @@ private: // AP - See CustomMap.h for an explanation of this static CustomMap chunksToPoll; #else - static unordered_map chunksToPoll; + static std::unordered_map chunksToPoll; #endif public: diff --git a/Minecraft.World/Blocks/NotGateTile.cpp b/Minecraft.World/Blocks/NotGateTile.cpp index ab6f3bc7e..6e535195d 100644 --- a/Minecraft.World/Blocks/NotGateTile.cpp +++ b/Minecraft.World/Blocks/NotGateTile.cpp @@ -4,7 +4,7 @@ #include "../Util/SoundTypes.h" #include "../Headers/net.minecraft.world.h" -unordered_map *> NotGateTile::recentToggles = unordered_map *>(); +std::unordered_map *> NotGateTile::recentToggles = std::unordered_map *>(); // 4J - added, to tie in with other changes brought forward from 1.3.2 to associate toggles with a level. In addition to what the java // version does, we are also removing any references to levels that we are storing when they hit their dtor. diff --git a/Minecraft.World/Blocks/NotGateTile.h b/Minecraft.World/Blocks/NotGateTile.h index 52dd4a2e5..12d46f704 100644 --- a/Minecraft.World/Blocks/NotGateTile.h +++ b/Minecraft.World/Blocks/NotGateTile.h @@ -31,7 +31,7 @@ public: }; private: - static unordered_map *> recentToggles; // 4J - brought forward change from 1.3.2 + static std::unordered_map *> recentToggles; // 4J - brought forward change from 1.3.2 public: static void removeLevelReferences(Level *level); // 4J added private: diff --git a/Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp b/Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp index 411ab8156..b72ee7fb1 100644 --- a/Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp +++ b/Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp @@ -98,7 +98,7 @@ const wstring PotionBrewing::MOD_GUNPOWDER = L""; // gunpowder makes them throwa PotionBrewing::intStringMap PotionBrewing::potionEffectDuration; PotionBrewing::intStringMap PotionBrewing::potionEffectAmplifier; -unordered_map PotionBrewing::cachedColors; +std::unordered_map PotionBrewing::cachedColors; void PotionBrewing::staticCtor() { diff --git a/Minecraft.World/Blocks/TileEntities/PotionBrewing.h b/Minecraft.World/Blocks/TileEntities/PotionBrewing.h index 686792939..6f0197e6b 100644 --- a/Minecraft.World/Blocks/TileEntities/PotionBrewing.h +++ b/Minecraft.World/Blocks/TileEntities/PotionBrewing.h @@ -29,7 +29,7 @@ public: static const wstring MOD_GOLDENCARROT; private: - typedef unordered_map intStringMap; + typedef std::unordered_map intStringMap; static intStringMap potionEffectDuration; static intStringMap potionEffectAmplifier; @@ -57,7 +57,7 @@ public: static int getColorValue(vector *effects); private: - static unordered_map cachedColors; + static std::unordered_map cachedColors; public: static int getColorValue(int brew, bool includeDisabledEffects); diff --git a/Minecraft.World/Blocks/TileEntities/TileEntity.cpp b/Minecraft.World/Blocks/TileEntities/TileEntity.cpp index 1fd4a81ce..7e01678c4 100644 --- a/Minecraft.World/Blocks/TileEntities/TileEntity.cpp +++ b/Minecraft.World/Blocks/TileEntities/TileEntity.cpp @@ -8,8 +8,8 @@ -TileEntity::idToCreateMapType TileEntity::idCreateMap = unordered_map(); -TileEntity::classToIdMapType TileEntity::classIdMap = unordered_map(); +TileEntity::idToCreateMapType TileEntity::idCreateMap = std::unordered_map(); +TileEntity::classToIdMapType TileEntity::classIdMap = std::unordered_map(); void TileEntity::staticCtor() { diff --git a/Minecraft.World/Blocks/TileEntities/TileEntity.h b/Minecraft.World/Blocks/TileEntities/TileEntity.h index 6106b3f92..4833f2910 100644 --- a/Minecraft.World/Blocks/TileEntities/TileEntity.h +++ b/Minecraft.World/Blocks/TileEntities/TileEntity.h @@ -16,8 +16,8 @@ public: static void staticCtor(); virtual eINSTANCEOF GetType() { return eTYPE_TILEENTITY; } private: - typedef unordered_map idToCreateMapType; - typedef unordered_map classToIdMapType; + typedef std::unordered_map idToCreateMapType; + typedef std::unordered_map classToIdMapType; static idToCreateMapType idCreateMap; static classToIdMapType classIdMap; static void setId(tileEntityCreateFn createFn, eINSTANCEOF clas, wstring id); diff --git a/Minecraft.World/Commands/CommandDispatcher.h b/Minecraft.World/Commands/CommandDispatcher.h index cfc4486a1..2a706fbff 100644 --- a/Minecraft.World/Commands/CommandDispatcher.h +++ b/Minecraft.World/Commands/CommandDispatcher.h @@ -7,9 +7,9 @@ class CommandDispatcher { private: #ifdef __ORBIS__ - unordered_map> commandsById; + std::unordered_map> commandsById; #else - unordered_map commandsById; + std::unordered_map commandsById; #endif unordered_set commands; diff --git a/Minecraft.World/Containers/MenuBackup.cpp b/Minecraft.World/Containers/MenuBackup.cpp index 2655e0930..7ba8133b2 100644 --- a/Minecraft.World/Containers/MenuBackup.cpp +++ b/Minecraft.World/Containers/MenuBackup.cpp @@ -7,7 +7,7 @@ MenuBackup::MenuBackup(std::shared_ptr inventory, AbstractContainerMenu *menu) { - backups = new unordered_map(); + backups = new std::unordered_map(); this->inventory = inventory; this->menu = menu; @@ -21,7 +21,7 @@ void MenuBackup::save(short changeUid) { (*backup)[i + 1] = ItemInstance::clone(menu->slots->at(i)->getItem()); } - // TODO Is unordered_map use correct? + // TODO Is std::unordered_map use correct? // Was backups.put(changeUid, backup); (*backups)[changeUid] = backup; } @@ -29,7 +29,7 @@ void MenuBackup::save(short changeUid) // Cannot use delete as function name as it is a reserved keyword void MenuBackup::deleteBackup(short changeUid) { - // TODO Is the unordered_map use correct? + // TODO Is the std::unordered_map use correct? // 4J Was backups.remove(changeUid); backups->erase(changeUid); } diff --git a/Minecraft.World/Containers/MenuBackup.h b/Minecraft.World/Containers/MenuBackup.h index 27df45dad..b29453a63 100644 --- a/Minecraft.World/Containers/MenuBackup.h +++ b/Minecraft.World/Containers/MenuBackup.h @@ -6,7 +6,7 @@ class Inventory; class MenuBackup { private: - unordered_map *backups; + std::unordered_map *backups; std::shared_ptr inventory; AbstractContainerMenu *menu; diff --git a/Minecraft.World/Containers/RepairMenu.cpp b/Minecraft.World/Containers/RepairMenu.cpp index 3ef1b563e..7f9120a99 100644 --- a/Minecraft.World/Containers/RepairMenu.cpp +++ b/Minecraft.World/Containers/RepairMenu.cpp @@ -65,7 +65,7 @@ void RepairMenu::createResult() { std::shared_ptr result = input->copy(); std::shared_ptr addition = repairSlots->getItem(ADDITIONAL_SLOT); - unordered_map *enchantments = EnchantmentHelper::getEnchantments(result); + std::unordered_map *enchantments = EnchantmentHelper::getEnchantments(result); bool usingBook = false; tax += input->getBaseRepairCost() + (addition == NULL ? 0 : addition->getBaseRepairCost()); @@ -132,7 +132,7 @@ void RepairMenu::createResult() } } - unordered_map *additionalEnchantments = EnchantmentHelper::getEnchantments(addition); + std::unordered_map *additionalEnchantments = EnchantmentHelper::getEnchantments(addition); for(AUTO_VAR(it, additionalEnchantments->begin()); it != additionalEnchantments->end(); ++it) { diff --git a/Minecraft.World/Enchantments/EnchantmentHelper.cpp b/Minecraft.World/Enchantments/EnchantmentHelper.cpp index f37cba337..8f172e429 100644 --- a/Minecraft.World/Enchantments/EnchantmentHelper.cpp +++ b/Minecraft.World/Enchantments/EnchantmentHelper.cpp @@ -33,9 +33,9 @@ int EnchantmentHelper::getEnchantmentLevel(int enchantmentId, std::shared_ptr *EnchantmentHelper::getEnchantments(std::shared_ptr item) +std::unordered_map *EnchantmentHelper::getEnchantments(std::shared_ptr item) { - unordered_map *result = new unordered_map(); + std::unordered_map *result = new std::unordered_map(); ListTag *list = item->id == Item::enchantedBook_Id ? Item::enchantedBook->getEnchantments(item) : item->getEnchantmentTags(); if (list != NULL) @@ -45,14 +45,14 @@ unordered_map *EnchantmentHelper::getEnchantments(std::shared_ptrget(i)->getShort((wchar_t *)ItemInstance::TAG_ENCH_ID); int level = list->get(i)->getShort((wchar_t *)ItemInstance::TAG_ENCH_LEVEL); - result->insert( unordered_map::value_type(type, level)); + result->insert( std::unordered_map::value_type(type, level)); } } return result; } -void EnchantmentHelper::setEnchantments(unordered_map *enchantments, std::shared_ptr item) +void EnchantmentHelper::setEnchantments(std::unordered_map *enchantments, std::shared_ptr item) { ListTag *list = new ListTag(); @@ -357,7 +357,7 @@ vector *EnchantmentHelper::selectEnchantment(Random *rand vector *results = NULL; - unordered_map *availableEnchantments = getAvailableEnchantmentResults(realValue, itemInstance); + std::unordered_map *availableEnchantments = getAvailableEnchantmentResults(realValue, itemInstance); if (availableEnchantments != NULL && !availableEnchantments->empty()) { vector values; @@ -433,10 +433,10 @@ vector *EnchantmentHelper::selectEnchantment(Random *rand return results; } -unordered_map *EnchantmentHelper::getAvailableEnchantmentResults(int value, std::shared_ptr itemInstance) +std::unordered_map *EnchantmentHelper::getAvailableEnchantmentResults(int value, std::shared_ptr itemInstance) { Item *item = itemInstance->getItem(); - unordered_map *results = NULL; + std::unordered_map *results = NULL; bool isBook = itemInstance->id == Item::book_Id; @@ -461,7 +461,7 @@ unordered_map *EnchantmentHelper::getAvailableEnchan { if (results == NULL) { - results = new unordered_map(); + results = new std::unordered_map(); } AUTO_VAR(it, results->find(e->id)); if(it != results->end()) diff --git a/Minecraft.World/Enchantments/EnchantmentHelper.h b/Minecraft.World/Enchantments/EnchantmentHelper.h index 382017bcb..46b73c718 100644 --- a/Minecraft.World/Enchantments/EnchantmentHelper.h +++ b/Minecraft.World/Enchantments/EnchantmentHelper.h @@ -13,8 +13,8 @@ private: public: static int getEnchantmentLevel(int enchantmentId, std::shared_ptr piece); - static unordered_map *getEnchantments(std::shared_ptr item); - static void setEnchantments(unordered_map *enchantments, std::shared_ptr item); + static std::unordered_map *getEnchantments(std::shared_ptr item); + static void setEnchantments(std::unordered_map *enchantments, std::shared_ptr item); static int getEnchantmentLevel(int enchantmentId, ItemInstanceArray inventory); @@ -106,5 +106,5 @@ public: * @return */ static vector *selectEnchantment(Random *random, std::shared_ptr itemInstance, int enchantmentCost); - static unordered_map *getAvailableEnchantmentResults(int value, std::shared_ptr itemInstance); + static std::unordered_map *getAvailableEnchantmentResults(int value, std::shared_ptr itemInstance); }; \ No newline at end of file diff --git a/Minecraft.World/Entities/Mob.cpp b/Minecraft.World/Entities/Mob.cpp index 1d635cf9a..9d708b7d7 100644 --- a/Minecraft.World/Entities/Mob.cpp +++ b/Minecraft.World/Entities/Mob.cpp @@ -1125,7 +1125,7 @@ void Mob::readAdditionalSaveData(CompoundTag *tag) int amplifier = effectTag->getByte(L"Amplifier"); int duration = effectTag->getInt(L"Duration"); - activeEffects.insert( unordered_map::value_type( id, new MobEffectInstance(id, duration, amplifier) ) ); + activeEffects.insert( std::unordered_map::value_type( id, new MobEffectInstance(id, duration, amplifier) ) ); } } } @@ -1783,7 +1783,7 @@ void Mob::addEffect(MobEffectInstance *newEffect) } else { - activeEffects.insert( unordered_map::value_type( newEffect->getId(), newEffect ) ); + activeEffects.insert( std::unordered_map::value_type( newEffect->getId(), newEffect ) ); onEffectAdded(newEffect); } } @@ -1804,7 +1804,7 @@ void Mob::addEffectNoUpdate(MobEffectInstance *newEffect) } else { - activeEffects.insert( unordered_map::value_type( newEffect->getId(), newEffect ) ); + activeEffects.insert( std::unordered_map::value_type( newEffect->getId(), newEffect ) ); } } diff --git a/Minecraft.World/Entities/Mobs/Villager.cpp b/Minecraft.World/Entities/Mobs/Villager.cpp index cef641fff..95af10039 100644 --- a/Minecraft.World/Entities/Mobs/Villager.cpp +++ b/Minecraft.World/Entities/Mobs/Villager.cpp @@ -17,8 +17,8 @@ #include "Villager.h" #include -unordered_map > Villager::MIN_MAX_VALUES; -unordered_map > Villager::MIN_MAX_PRICES; +std::unordered_map > Villager::MIN_MAX_VALUES; +std::unordered_map > Villager::MIN_MAX_PRICES; void Villager::_init(int profession) { diff --git a/Minecraft.World/Entities/Mobs/Villager.h b/Minecraft.World/Entities/Mobs/Villager.h index e4550f3ef..ae18ecfbb 100644 --- a/Minecraft.World/Entities/Mobs/Villager.h +++ b/Minecraft.World/Entities/Mobs/Villager.h @@ -109,8 +109,8 @@ public: void overrideOffers(MerchantRecipeList *recipeList); private: - static unordered_map > MIN_MAX_VALUES; - static unordered_map > MIN_MAX_PRICES; + static std::unordered_map > MIN_MAX_VALUES; + static std::unordered_map > MIN_MAX_PRICES; public: static void staticCtor(); diff --git a/Minecraft.World/Entities/SyncedEntityData.h b/Minecraft.World/Entities/SyncedEntityData.h index 666a8432e..404441b80 100644 --- a/Minecraft.World/Entities/SyncedEntityData.h +++ b/Minecraft.World/Entities/SyncedEntityData.h @@ -71,7 +71,7 @@ private: // the id value must fit in the remaining bits static const int MAX_ID_VALUE = ~TYPE_MASK & 0xff; - unordered_map > itemsById; + std::unordered_map > itemsById; bool m_isDirty; public: diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h index 0b2017a2e..a35a5838b 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h +++ b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h @@ -48,7 +48,7 @@ private: bool dirty; int64_t lastWritten; }; - unordered_map regionFiles; + std::unordered_map regionFiles; vector writeHistory; int64_t m_lastTickTime; diff --git a/Minecraft.World/IO/NBT/CompoundTag.h b/Minecraft.World/IO/NBT/CompoundTag.h index e4e67ce18..244de5179 100644 --- a/Minecraft.World/IO/NBT/CompoundTag.h +++ b/Minecraft.World/IO/NBT/CompoundTag.h @@ -14,7 +14,7 @@ class CompoundTag : public Tag { private: - unordered_map tags; + std::unordered_map tags; public: CompoundTag() : Tag(L"") {} @@ -23,7 +23,7 @@ public: void write(DataOutput *dos) { AUTO_VAR(itEnd, tags.end()); - for( unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) + for( std::unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) { Tag::writeNamedTag(it->second, dos); } @@ -48,7 +48,7 @@ public: vector *ret = new vector; AUTO_VAR(itEnd, tags.end()); - for( unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) + for( std::unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) { ret->push_back(it->second); } @@ -229,7 +229,7 @@ public: strcat( newPrefix, " "); AUTO_VAR(itEnd, tags.end()); - for( unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) + for( std::unordered_map::iterator it = tags.begin(); it != itEnd; it++ ) { it->second->print(newPrefix, out); } diff --git a/Minecraft.World/Items/PotionItem.h b/Minecraft.World/Items/PotionItem.h index 0d5dd1817..02f39e974 100644 --- a/Minecraft.World/Items/PotionItem.h +++ b/Minecraft.World/Items/PotionItem.h @@ -15,7 +15,7 @@ public: static const wstring CONTENTS_ICON; private: - unordered_map *> cachedMobEffects; + std::unordered_map *> cachedMobEffects; Icon *iconThrowable; Icon *iconDrinkable; diff --git a/Minecraft.World/Level/Explosion.h b/Minecraft.World/Level/Explosion.h index 602126fa4..b15ce6b99 100644 --- a/Minecraft.World/Level/Explosion.h +++ b/Minecraft.World/Level/Explosion.h @@ -25,7 +25,7 @@ public: unordered_set toBlow; private: - typedef unordered_map, Vec3 * , PlayerKeyHash, PlayerKeyEq> playerVec3Map; + typedef std::unordered_map, Vec3 * , PlayerKeyHash, PlayerKeyEq> playerVec3Map; playerVec3Map hitPlayers; public: diff --git a/Minecraft.World/Level/LevelChunk.cpp b/Minecraft.World/Level/LevelChunk.cpp index 8497ef6f9..3bce22d96 100644 --- a/Minecraft.World/Level/LevelChunk.cpp +++ b/Minecraft.World/Level/LevelChunk.cpp @@ -1529,7 +1529,7 @@ void LevelChunk::unload(bool unloadTileEntities) // 4J - added parameter ListTag *tileEntityTags = new ListTag(); AUTO_VAR(itEnd,tileEntities.end()); - for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = tileEntities.begin(); + for( std::unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = tileEntities.begin(); it != itEnd; it++) { std::shared_ptr te = it->second; diff --git a/Minecraft.World/Level/LevelChunk.h b/Minecraft.World/Level/LevelChunk.h index 9ac4f25ed..fa8db6627 100644 --- a/Minecraft.World/Level/LevelChunk.h +++ b/Minecraft.World/Level/LevelChunk.h @@ -100,7 +100,7 @@ private: bool hasGapsToCheck; public: - unordered_map, TilePosKeyHash, TilePosKeyEq> tileEntities; + std::unordered_map, TilePosKeyHash, TilePosKeyEq> tileEntities; vector > **entityBlocks; static const int sTerrainPopulatedFromHere = 2; diff --git a/Minecraft.World/Level/Storage/DirectoryLevelStorage.h b/Minecraft.World/Level/Storage/DirectoryLevelStorage.h index 01d95d9ad..74d7f829d 100644 --- a/Minecraft.World/Level/Storage/DirectoryLevelStorage.h +++ b/Minecraft.World/Level/Storage/DirectoryLevelStorage.h @@ -75,7 +75,7 @@ private: { friend class DirectoryLevelStorage; private: - unordered_map<__int64, short> m_mappings; + std::unordered_map<__int64, short> m_mappings; public: void addMapping(int id, int centreX, int centreZ, int dimension, int scale); @@ -84,9 +84,9 @@ private: void readMappings(DataInputStream *dis); }; #if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || defined(_DURANGO) - unordered_map m_playerMappings; + std::unordered_map m_playerMappings; #else - unordered_map m_playerMappings; + std::unordered_map m_playerMappings; #endif byteArray m_usedMappings; #else @@ -95,7 +95,7 @@ private: #endif bool m_bHasLoadedMapDataMappings; - unordered_map m_cachedSaveData; + std::unordered_map m_cachedSaveData; vector m_mapFilesToDelete; // Temp list of files that couldn't be deleted immediately due to saving being disabled protected: diff --git a/Minecraft.World/Level/Storage/EntityIO.cpp b/Minecraft.World/Level/Storage/EntityIO.cpp index 2d3f054db..1ae6226c1 100644 --- a/Minecraft.World/Level/Storage/EntityIO.cpp +++ b/Minecraft.World/Level/Storage/EntityIO.cpp @@ -14,29 +14,29 @@ #include "../../Headers/com.mojang.nbt.h" #include "EntityIO.h" -unordered_map *EntityIO::idCreateMap = new unordered_map; -unordered_map *EntityIO::classIdMap = new unordered_map; -unordered_map *EntityIO::numCreateMap = new unordered_map; -unordered_map *EntityIO::numClassMap = new unordered_map; -unordered_map *EntityIO::classNumMap = new unordered_map; -unordered_map *EntityIO::idNumMap = new unordered_map; -unordered_map EntityIO::idsSpawnableInCreative; +std::unordered_map *EntityIO::idCreateMap = new std::unordered_map; +std::unordered_map *EntityIO::classIdMap = new std::unordered_map; +std::unordered_map *EntityIO::numCreateMap = new std::unordered_map; +std::unordered_map *EntityIO::numClassMap = new std::unordered_map; +std::unordered_map *EntityIO::classNumMap = new std::unordered_map; +std::unordered_map *EntityIO::idNumMap = new std::unordered_map; +std::unordered_map EntityIO::idsSpawnableInCreative; void EntityIO::setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum) { - idCreateMap->insert( unordered_map::value_type(id, createFn) ); - classIdMap->insert( unordered_map::value_type(clas,id ) ); - numCreateMap->insert( unordered_map::value_type(idNum, createFn) ); - numClassMap->insert( unordered_map::value_type(idNum, clas) ); - classNumMap->insert( unordered_map::value_type(clas, idNum) ); - idNumMap->insert( unordered_map::value_type(id, idNum) ); + idCreateMap->insert( std::unordered_map::value_type(id, createFn) ); + classIdMap->insert( std::unordered_map::value_type(clas,id ) ); + numCreateMap->insert( std::unordered_map::value_type(idNum, createFn) ); + numClassMap->insert( std::unordered_map::value_type(idNum, clas) ); + classNumMap->insert( std::unordered_map::value_type(clas, idNum) ); + idNumMap->insert( std::unordered_map::value_type(id, idNum) ); } void EntityIO::setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum, eMinecraftColour color1, eMinecraftColour color2, int nameId) { setId(createFn, clas, id, idNum); - idsSpawnableInCreative.insert( unordered_map::value_type( idNum, new SpawnableMobInfo(idNum, color1, color2, nameId) ) ); + idsSpawnableInCreative.insert( std::unordered_map::value_type( idNum, new SpawnableMobInfo(idNum, color1, color2, nameId) ) ); } void EntityIO::staticCtor() @@ -161,7 +161,7 @@ std::shared_ptr EntityIO::newByEnumType(eINSTANCEOF eType, Level *level) { std::shared_ptr entity; - unordered_map::iterator it = classNumMap->find( eType ); + std::unordered_map::iterator it = classNumMap->find( eType ); if( it != classNumMap->end() ) { AUTO_VAR(it2, numCreateMap->find(it->second)); @@ -177,13 +177,13 @@ std::shared_ptr EntityIO::newByEnumType(eINSTANCEOF eType, Level *level) int EntityIO::getId(std::shared_ptr entity) { - unordered_map::iterator it = classNumMap->find( entity->GetType() ); + std::unordered_map::iterator it = classNumMap->find( entity->GetType() ); return (*it).second; } wstring EntityIO::getEncodeId(std::shared_ptr entity) { - unordered_map::iterator it = classIdMap->find( entity->GetType() ); + std::unordered_map::iterator it = classIdMap->find( entity->GetType() ); if( it != classIdMap->end() ) return (*it).second; else @@ -212,7 +212,7 @@ wstring EntityIO::getEncodeId(int entityIoValue) AUTO_VAR(it, numClassMap->find(entityIoValue)); if(it != numClassMap->end() ) { - unordered_map::iterator classIdIt = classIdMap->find( it->second ); + std::unordered_map::iterator classIdIt = classIdMap->find( it->second ); if( classIdIt != classIdMap->end() ) return (*classIdIt).second; else @@ -257,7 +257,7 @@ eINSTANCEOF EntityIO::getClass(int id) int EntityIO::eTypeToIoid(eINSTANCEOF eType) { - unordered_map::iterator it = classNumMap->find( eType ); + std::unordered_map::iterator it = classNumMap->find( eType ); if( it != classNumMap->end() ) return it->second; return -1; diff --git a/Minecraft.World/Level/Storage/EntityIO.h b/Minecraft.World/Level/Storage/EntityIO.h index 644a90191..b5e87b5e2 100644 --- a/Minecraft.World/Level/Storage/EntityIO.h +++ b/Minecraft.World/Level/Storage/EntityIO.h @@ -28,15 +28,15 @@ public: }; private: - static unordered_map *idCreateMap; - static unordered_map *classIdMap; - static unordered_map *numCreateMap; - static unordered_map *numClassMap; - static unordered_map *classNumMap; - static unordered_map *idNumMap; + static std::unordered_map *idCreateMap; + static std::unordered_map *classIdMap; + static std::unordered_map *numCreateMap; + static std::unordered_map *numClassMap; + static std::unordered_map *classNumMap; + static std::unordered_map *idNumMap; public: - static unordered_map idsSpawnableInCreative; + static std::unordered_map idsSpawnableInCreative; private: static void setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum); diff --git a/Minecraft.World/Level/Storage/MapItemSavedData.cpp b/Minecraft.World/Level/Storage/MapItemSavedData.cpp index f9cf0672b..03d320c51 100644 --- a/Minecraft.World/Level/Storage/MapItemSavedData.cpp +++ b/Minecraft.World/Level/Storage/MapItemSavedData.cpp @@ -309,7 +309,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr player, std::shared } #endif //decorations.push_back(new MapDecoration(4, x, y, 0)); - nonPlayerDecorations.insert( unordered_map::value_type( END_PORTAL_DECORATION_KEY, new MapDecoration(4, x, y, 0, END_PORTAL_DECORATION_KEY, true) ) ); + nonPlayerDecorations.insert( std::unordered_map::value_type( END_PORTAL_DECORATION_KEY, new MapDecoration(4, x, y, 0, END_PORTAL_DECORATION_KEY, true) ) ); } else if ( currentPortalDecoration != nonPlayerDecorations.end() && !atLeastOnePlayerInTheEnd ) { @@ -346,7 +346,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr player, std::shared } #endif //decorations.push_back(new MapDecoration(7, x, y, 0)); - nonPlayerDecorations.insert( unordered_map::value_type( item->getFrame()->entityId, new MapDecoration(12, x, y, rot, item->getFrame()->entityId, true) ) ); + nonPlayerDecorations.insert( std::unordered_map::value_type( item->getFrame()->entityId, new MapDecoration(12, x, y, rot, item->getFrame()->entityId, true) ) ); } } @@ -380,7 +380,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr player, std::shared } #endif //decorations.push_back(new MapDecoration(7, x, y, 0)); - nonPlayerDecorations.insert( unordered_map::value_type( ent->entityId, new MapDecoration(4, x, y, rot, ent->entityId, true) ) ); + nonPlayerDecorations.insert( std::unordered_map::value_type( ent->entityId, new MapDecoration(4, x, y, rot, ent->entityId, true) ) ); } #endif diff --git a/Minecraft.World/Level/Storage/MapItemSavedData.h b/Minecraft.World/Level/Storage/MapItemSavedData.h index dfd6f4894..45dc5dddc 100644 --- a/Minecraft.World/Level/Storage/MapItemSavedData.h +++ b/Minecraft.World/Level/Storage/MapItemSavedData.h @@ -56,7 +56,7 @@ public: vector > carriedBy; private: - typedef unordered_map , std::shared_ptr , PlayerKeyHash, PlayerKeyEq> playerHoldingPlayerMapType; + typedef std::unordered_map , std::shared_ptr , PlayerKeyHash, PlayerKeyEq> playerHoldingPlayerMapType; playerHoldingPlayerMapType carriedByPlayers; public: @@ -64,7 +64,7 @@ public: private: // 4J Stu added - unordered_map nonPlayerDecorations; + std::unordered_map nonPlayerDecorations; static const int END_PORTAL_DECORATION_KEY; diff --git a/Minecraft.World/Level/Storage/McRegionChunkStorage.h b/Minecraft.World/Level/Storage/McRegionChunkStorage.h index 1a783fa67..e63bc3957 100644 --- a/Minecraft.World/Level/Storage/McRegionChunkStorage.h +++ b/Minecraft.World/Level/Storage/McRegionChunkStorage.h @@ -16,7 +16,7 @@ private: ConsoleSaveFile *m_saveFile; static CRITICAL_SECTION cs_memory; - unordered_map<__int64, byteArray> m_entityData; + std::unordered_map<__int64, byteArray> m_entityData; static std::deque s_chunkDataQueue; static int s_runningThreadCount; diff --git a/Minecraft.World/Level/Storage/OldChunkStorage.cpp b/Minecraft.World/Level/Storage/OldChunkStorage.cpp index a531183a4..5d49c7ddd 100644 --- a/Minecraft.World/Level/Storage/OldChunkStorage.cpp +++ b/Minecraft.World/Level/Storage/OldChunkStorage.cpp @@ -268,7 +268,7 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, DataOutputStream *dos) ListTag *tileEntityTags = new ListTag(); AUTO_VAR(itEnd, lc->tileEntities.end()); - for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); + for( std::unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); it != itEnd; it++) { std::shared_ptr te = it->second; @@ -357,7 +357,7 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, CompoundTag *tag) ListTag *tileEntityTags = new ListTag(); AUTO_VAR(itEnd, lc->tileEntities.end()); - for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); + for( std::unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); it != itEnd; it++) { std::shared_ptr te = it->second; diff --git a/Minecraft.World/Level/Storage/RegionFileCache.h b/Minecraft.World/Level/Storage/RegionFileCache.h index b9f8e7291..abad6b060 100644 --- a/Minecraft.World/Level/Storage/RegionFileCache.h +++ b/Minecraft.World/Level/Storage/RegionFileCache.h @@ -9,7 +9,7 @@ class RegionFileCache private: static const int MAX_CACHE_SIZE = 256; - unordered_map cache; + std::unordered_map cache; static RegionFileCache s_defaultCache; diff --git a/Minecraft.World/Level/Storage/SavedDataStorage.cpp b/Minecraft.World/Level/Storage/SavedDataStorage.cpp index 14437c385..e52d058e6 100644 --- a/Minecraft.World/Level/Storage/SavedDataStorage.cpp +++ b/Minecraft.World/Level/Storage/SavedDataStorage.cpp @@ -11,9 +11,9 @@ SavedDataStorage::SavedDataStorage(LevelStorage *levelStorage) { /* - cache = new unordered_map >; + cache = new std::unordered_map >; savedDatas = new vector >; - usedAuxIds = new unordered_map; + usedAuxIds = new std::unordered_map; */ this->levelStorage = levelStorage; @@ -59,7 +59,7 @@ std::shared_ptr SavedDataStorage::get(const type_info& clazz, const w if (data != NULL) { - cache.insert( unordered_map >::value_type( id , data ) ); + cache.insert( std::unordered_map >::value_type( id , data ) ); savedDatas.push_back(data); } return data; diff --git a/Minecraft.World/Level/Storage/SavedDataStorage.h b/Minecraft.World/Level/Storage/SavedDataStorage.h index d18ebcc60..16128040e 100644 --- a/Minecraft.World/Level/Storage/SavedDataStorage.h +++ b/Minecraft.World/Level/Storage/SavedDataStorage.h @@ -9,12 +9,12 @@ class SavedDataStorage private: LevelStorage *levelStorage; - typedef unordered_map > cacheMapType; + typedef std::unordered_map > cacheMapType; cacheMapType cache; vector > savedDatas; - typedef unordered_map uaiMapType; + typedef std::unordered_map uaiMapType; uaiMapType usedAuxIds; public: diff --git a/Minecraft.World/Level/Storage/ZonedChunkStorage.cpp b/Minecraft.World/Level/Storage/ZonedChunkStorage.cpp index ea2ec909c..4adadbb7f 100644 --- a/Minecraft.World/Level/Storage/ZonedChunkStorage.cpp +++ b/Minecraft.World/Level/Storage/ZonedChunkStorage.cpp @@ -150,7 +150,7 @@ void ZonedChunkStorage::tick() vector<__int64> toClose; AUTO_VAR(itEndZF, zoneFiles.end()); - for( unordered_map<__int64, ZoneFile *>::iterator it = zoneFiles.begin(); it != itEndZF; it++ ) + for( std::unordered_map<__int64, ZoneFile *>::iterator it = zoneFiles.begin(); it != itEndZF; it++ ) { ZoneFile *zoneFile = it->second; if (tickCount - zoneFile->lastUse > 20 * 60) @@ -181,7 +181,7 @@ void ZonedChunkStorage::tick() void ZonedChunkStorage::flush() { AUTO_VAR(itEnd, zoneFiles.end()); - for( unordered_map<__int64, ZoneFile *>::iterator it = zoneFiles.begin(); it != itEnd; it++ ) + for( std::unordered_map<__int64, ZoneFile *>::iterator it = zoneFiles.begin(); it != itEnd; it++ ) { ZoneFile *zoneFile = it->second; // 4J - removed try/catch @@ -250,7 +250,7 @@ void ZonedChunkStorage::saveEntities(Level *level, LevelChunk *lc) LeaveCriticalSection(&lc->m_csEntities); #endif - for( unordered_map , TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); + for( std::unordered_map , TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); it != lc->tileEntities.end(); it++) { std::shared_ptr te = it->second; diff --git a/Minecraft.World/Level/Storage/ZonedChunkStorage.h b/Minecraft.World/Level/Storage/ZonedChunkStorage.h index 4722e4016..f93181674 100644 --- a/Minecraft.World/Level/Storage/ZonedChunkStorage.h +++ b/Minecraft.World/Level/Storage/ZonedChunkStorage.h @@ -30,7 +30,7 @@ public: File dir; private: - unordered_map<__int64, ZoneFile *> zoneFiles; + std::unordered_map<__int64, ZoneFile *> zoneFiles; __int64 tickCount; public: diff --git a/Minecraft.World/Network/Packets/Packet.cpp b/Minecraft.World/Network/Packets/Packet.cpp index 9a1547b69..74da9b782 100644 --- a/Minecraft.World/Network/Packets/Packet.cpp +++ b/Minecraft.World/Network/Packets/Packet.cpp @@ -163,14 +163,14 @@ Packet::Packet() : createTime( System::currentTimeMillis() ) shouldDelay = false; } -unordered_map Packet::idToCreateMap; +std::unordered_map Packet::idToCreateMap; unordered_set Packet::clientReceivedPackets = unordered_set(); unordered_set Packet::serverReceivedPackets = unordered_set(); unordered_set Packet::sendToAnyClientPackets = unordered_set(); // 4J Added -unordered_map Packet::outgoingStatistics = unordered_map(); +std::unordered_map Packet::outgoingStatistics = std::unordered_map(); vector Packet::renderableStats = vector(); int Packet::renderPos = 0; @@ -182,7 +182,7 @@ void Packet::map(int id, bool receiveOnClient, bool receiveOnServer, bool sendTo if (classToIdMap.count(clazz) > 0) throw new IllegalArgumentException(L"Duplicate packet class:"); // TODO + clazz); #endif - idToCreateMap.insert( unordered_map::value_type(id, createFn) ); + idToCreateMap.insert( std::unordered_map::value_type(id, createFn) ); #ifndef _CONTENT_PACKAGE #if PACKET_ENABLE_STAT_TRACKING @@ -345,7 +345,7 @@ return id; } */ -unordered_map Packet::statistics = unordered_map(); +std::unordered_map Packet::statistics = std::unordered_map(); //int Packet::nextPrint = 0; diff --git a/Minecraft.World/Network/Packets/Packet.h b/Minecraft.World/Network/Packets/Packet.h index 1349e1c3e..d4bd38525 100644 --- a/Minecraft.World/Network/Packets/Packet.h +++ b/Minecraft.World/Network/Packets/Packet.h @@ -47,7 +47,7 @@ public: static void staticCtor(); public: - static unordered_map idToCreateMap; // IntHashMap in 1.8.2 ... needed? // Made public in 1.0.1 + static std::unordered_map idToCreateMap; // IntHashMap in 1.8.2 ... needed? // Made public in 1.0.1 static unordered_set clientReceivedPackets; static unordered_set serverReceivedPackets; @@ -76,7 +76,7 @@ public: private: // 4J Added to track stats for packets that are going out via QNet - static unordered_map outgoingStatistics; // IntHashMap in 1.8.2 ... needed? + static std::unordered_map outgoingStatistics; // IntHashMap in 1.8.2 ... needed? static vector renderableStats; static int renderPos; public: @@ -87,7 +87,7 @@ public: static __int64 getIndexedStatValue(unsigned int samplePos, unsigned int renderableId); private : - static unordered_map statistics; + static std::unordered_map statistics; //static int nextPrint; public: diff --git a/Minecraft.World/Recipes/FurnaceRecipes.cpp b/Minecraft.World/Recipes/FurnaceRecipes.cpp index 04d1a5199..2f90e9182 100644 --- a/Minecraft.World/Recipes/FurnaceRecipes.cpp +++ b/Minecraft.World/Recipes/FurnaceRecipes.cpp @@ -66,7 +66,7 @@ ItemInstance *FurnaceRecipes::getResult(int itemId) return NULL; } -unordered_map *FurnaceRecipes::getRecipies() +std::unordered_map *FurnaceRecipes::getRecipies() { return &recipies; } diff --git a/Minecraft.World/Recipes/FurnaceRecipes.h b/Minecraft.World/Recipes/FurnaceRecipes.h index 168831c08..710c3511d 100644 --- a/Minecraft.World/Recipes/FurnaceRecipes.h +++ b/Minecraft.World/Recipes/FurnaceRecipes.h @@ -11,8 +11,8 @@ public: private: //Map recipies = new HashMap(); - unordered_map recipies; - unordered_map recipeValue; + std::unordered_map recipies; + std::unordered_map recipeValue; public: static FurnaceRecipes *getInstance(); @@ -24,7 +24,7 @@ public: void addFurnaceRecipy(int itemId, ItemInstance *result, float value); bool isFurnaceItem(int itemId); ItemInstance *getResult(int itemId); - unordered_map *getRecipies(); + std::unordered_map *getRecipies(); float getRecipeValue(int itemId); }; diff --git a/Minecraft.World/Recipes/Recipes.cpp b/Minecraft.World/Recipes/Recipes.cpp index c152f8bf6..2c96ddbb5 100644 --- a/Minecraft.World/Recipes/Recipes.cpp +++ b/Minecraft.World/Recipes/Recipes.cpp @@ -942,7 +942,7 @@ ShapedRecipy *Recipes::addShapedRecipy(ItemInstance *result, ...) int iCount; ItemInstance **ids = NULL; - myMap *mappings = new unordered_map(); + myMap *mappings = new std::unordered_map(); va_start(vl,result); // 4J-PB - second argument is a list of the types diff --git a/Minecraft.World/Recipes/Recipes.h b/Minecraft.World/Recipes/Recipes.h index 023a73b81..e6aadcef2 100644 --- a/Minecraft.World/Recipes/Recipes.h +++ b/Minecraft.World/Recipes/Recipes.h @@ -32,7 +32,7 @@ class ToolRecipies; class WeaponRecipies; class ShapedRecipy; -typedef unordered_map myMap; +typedef std::unordered_map myMap; #define ADD_OBJECT(a,b) a.push_back(new Object(b)) diff --git a/Minecraft.World/Stats/Stats.cpp b/Minecraft.World/Stats/Stats.cpp index 36996a423..87a35731b 100644 --- a/Minecraft.World/Stats/Stats.cpp +++ b/Minecraft.World/Stats/Stats.cpp @@ -15,7 +15,7 @@ const int Stats::ITEMS_COLLECTED_OFFSET = 0x1010000; const int Stats::ITEMS_CRAFTED_OFFSET = 0x1020000; const int Stats::ADDITIONAL_STATS_OFFSET = 0x5010000; // Needs to be higher than Achievements::ACHIEVEMENT_OFFSET = 0x500000; -unordered_map* Stats::statsById = new unordered_map; +std::unordered_map* Stats::statsById = new std::unordered_map; vector *Stats::all = new vector; vector *Stats::generalStats = new vector; diff --git a/Minecraft.World/Stats/Stats.h b/Minecraft.World/Stats/Stats.h index efbeb1ea0..49055a17e 100644 --- a/Minecraft.World/Stats/Stats.h +++ b/Minecraft.World/Stats/Stats.h @@ -16,7 +16,7 @@ private: static const int ADDITIONAL_STATS_OFFSET; protected: - static unordered_map* statsById; + static std::unordered_map* statsById; public: static vector *all; diff --git a/Minecraft.World/WorldGen/Biomes/BiomeCache.h b/Minecraft.World/WorldGen/Biomes/BiomeCache.h index 999102e03..b8faf8ae6 100644 --- a/Minecraft.World/WorldGen/Biomes/BiomeCache.h +++ b/Minecraft.World/WorldGen/Biomes/BiomeCache.h @@ -32,7 +32,7 @@ public: }; private: - unordered_map<__int64,Block *,LongKeyHash,LongKeyEq> cached; // 4J - was LongHashMap + std::unordered_map<__int64,Block *,LongKeyHash,LongKeyEq> cached; // 4J - was LongHashMap vector all; // was ArrayList public: diff --git a/Minecraft.World/WorldGen/Features/StructureFeature.h b/Minecraft.World/WorldGen/Features/StructureFeature.h index 642e6aad6..b52489ec9 100644 --- a/Minecraft.World/WorldGen/Features/StructureFeature.h +++ b/Minecraft.World/WorldGen/Features/StructureFeature.h @@ -16,7 +16,7 @@ public: }; protected: - unordered_map<__int64, StructureStart *> cachedStructures; + std::unordered_map<__int64, StructureStart *> cachedStructures; public: ~StructureFeature(); diff --git a/Minecraft.World/WorldGen/Structures/Village.h b/Minecraft.World/WorldGen/Structures/Village.h index 27839d4ed..2ab17f4bb 100644 --- a/Minecraft.World/WorldGen/Structures/Village.h +++ b/Minecraft.World/WorldGen/Structures/Village.h @@ -14,7 +14,7 @@ private: int populationSize; int noBreedTimer; - unordered_map playerStanding; + std::unordered_map playerStanding; class Aggressor {