refactor: unglob std::unordered_map

This commit is contained in:
Tropical 2026-03-06 11:29:36 -06:00 committed by JuiceyDev
parent 8812c3967b
commit c571014bc9
106 changed files with 204 additions and 204 deletions

View file

@ -7,7 +7,7 @@ class Settings
// public static Logger logger = Logger.getLogger("Minecraft");
// private Properties properties = new Properties();
private:
unordered_map<wstring,wstring> properties; // 4J - TODO was Properties type, will need to implement something we can serialise/deserialise too
std::unordered_map<wstring,wstring> properties; // 4J - TODO was Properties type, will need to implement something we can serialise/deserialise too
//File *file;
public:

View file

@ -22,7 +22,7 @@ Stat** StatsCounter::LARGE_STATS[] = {
&Stats::timePlayed
};
unordered_map<Stat*, int> StatsCounter::statBoards;
std::unordered_map<Stat*, int> 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<Stat*, int>::iterator leaderboardEntry = statBoards.find(stat);
std::unordered_map<Stat*, int>::iterator leaderboardEntry = statBoards.find(stat);
if( leaderboardEntry != statBoards.end() )
{
app.DebugPrintf("[StatsCounter] award(): %X\n", leaderboardEntry->second << difficulty);

View file

@ -28,7 +28,7 @@ private:
}
};
typedef unordered_map<Stat*, StatContainer> StatsMap;
typedef std::unordered_map<Stat*, StatContainer> 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<Stat*, int> statBoards;
static std::unordered_map<Stat*, int> statBoards;
int flushCounter;
public:

View file

@ -14,8 +14,8 @@ private:
volatile bool busy;
volatile unordered_map<Stat *, int> *serverStats;
volatile unordered_map<Stat *, int> *failedSentStats;
volatile std::unordered_map<Stat *, int> *serverStats;
volatile std::unordered_map<Stat *, int> *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<Stat *, int> *loadStatsFromDisk(File *file, File *tmp, File *old);
unordered_map<Stat *, int> *loadStatsFromDisk(File *file);
void doSend(unordered_map<Stat *, int> *stats);
void doSave(unordered_map<Stat *, int> *stats, File *file, File *tmp, File *old);
std::unordered_map<Stat *, int> *loadStatsFromDisk(File *file, File *tmp, File *old);
std::unordered_map<Stat *, int> *loadStatsFromDisk(File *file);
void doSend(std::unordered_map<Stat *, int> *stats);
void doSave(std::unordered_map<Stat *, int> *stats, File *file, File *tmp, File *old);
protected:
unordered_map<Stat *, int> *doGetStats();
std::unordered_map<Stat *, int> *doGetStats();
public:
void getStatsFromServer();
void saveUnsent(unordered_map<Stat *, int> *stats);
void sendUnsent(unordered_map<Stat *, int> *stats, unordered_map<Stat *, int> *fullStats);
void forceSendUnsent(unordered_map<Stat *, int> *stats);
void forceSaveUnsent(unordered_map<Stat *, int> *stats);
void saveUnsent(std::unordered_map<Stat *, int> *stats);
void sendUnsent(std::unordered_map<Stat *, int> *stats, std::unordered_map<Stat *, int> *fullStats);
void forceSendUnsent(std::unordered_map<Stat *, int> *stats);
void forceSaveUnsent(std::unordered_map<Stat *, int> *stats);
bool maySave();
bool maySend();
void tick();

View file

@ -54,7 +54,7 @@ public:
void setChunkVisible(int x, int z, bool visible);
private:
unordered_map<int, std::shared_ptr<Entity>, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap
std::unordered_map<int, std::shared_ptr<Entity>, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap
unordered_set<std::shared_ptr<Entity> > forced;
unordered_set<std::shared_ptr<Entity> > reEntries;

View file

@ -90,7 +90,7 @@ public:
private:
void saveLevelData();
typedef unordered_map<int, std::shared_ptr<Entity> , IntKeyHash2, IntKeyEq> intEntityMap;
typedef std::unordered_map<int, std::shared_ptr<Entity> , IntKeyHash2, IntKeyEq> intEntityMap;
intEntityMap entitiesById; // 4J - was IntHashMap, using same hashing function as this uses
protected:
virtual void entityAdded(std::shared_ptr<Entity> e);

View file

@ -64,7 +64,7 @@ int MinecraftServer::s_slowQueuePlayerIndex = 0;
int MinecraftServer::s_slowQueueLastTime = 0;
bool MinecraftServer::s_slowQueuePacketSent = false;
unordered_map<wstring, int> MinecraftServer::ironTimers;
std::unordered_map<wstring, int> MinecraftServer::ironTimers;
MinecraftServer::MinecraftServer()
{

View file

@ -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<wstring, int> ironTimers;
static std::unordered_map<wstring, int> ironTimers;
private:
static const int DEFAULT_MINECRAFT_PORT = 25565;

View file

@ -66,7 +66,7 @@ public:
vector<std::shared_ptr<ServerPlayer> > 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<PlayerChunk *> changedChunks;
vector<PlayerChunkAddRequest> addRequests; // 4J added
void tickAddRequests(std::shared_ptr<ServerPlayer> player); // 4J added

View file

@ -78,7 +78,7 @@ public:
virtual void handleContainerClose(std::shared_ptr<ContainerClosePacket> packet);
private:
unordered_map<int, short, IntKeyHash, IntKeyEq> expectedAcks;
std::unordered_map<int, short, IntKeyHash, IntKeyEq> expectedAcks;
public:
// 4J Stu - Handlers only valid in debug mode

View file

@ -27,7 +27,7 @@ XALLOC_ATTRIBUTES ExpandAllocAttributes( _In_ LONGLONG dwAttributes )
}
SIZE_T totalTracked = 0;
unordered_map<uintptr_t, SIZE_T> tracker;
std::unordered_map<uintptr_t, SIZE_T> tracker;
static volatile bool memDump = false;
static volatile bool memReset = false;
static bool memDumpInit = false;

View file

@ -169,7 +169,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
int CConsoleMinecraftApp::LoadLocalDLCImages()
{
unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
std::unordered_map<wstring,DLC_INFO * > *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<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
std::unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
{

View file

@ -984,7 +984,7 @@ void oldWinMainTick()
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -397,7 +397,7 @@ private:
bool m_notifyForFullParty;
unordered_map<unsigned int,DQRConnectionInfo *> m_sessionAddressToConnectionInfoMapHost; // For host - there may be more than one remote session attached to this listening session
std::unordered_map<unsigned int,DQRConnectionInfo *> 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

View file

@ -9,7 +9,7 @@ class CDurangoTelemetryManager : public CTelemetryManager
public:
static GUID ZERO_GUID;
unordered_map<wstring, float> m_multiplayerRoundStartTimes;
std::unordered_map<wstring, float> m_multiplayerRoundStartTimes;
CDurangoTelemetryManager();

View file

@ -1037,7 +1037,7 @@ void FreeRichPresenceStrings()
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -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<wstring, SONYDLC *>* pSONYDLCMap);
void SetDLCInfoMap(std::unordered_map<wstring, SONYDLC *>* pSONYDLCMap);
};
extern C4JStorage StorageManager;

View file

@ -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<wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
std::unordered_map<wstring, SONYDLC *>*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<wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
std::unordered_map<wstring, SONYDLC *>*pDLCInfoA=app.GetSonyDLCMap();
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
{
SONYDLC * pDLCInfo=(*it).second;

View file

@ -161,7 +161,7 @@ public:
bool DLCAlreadyPurchased(char *pchTitle);
char *GetSkuIDFromProductList();
void GetDLCSkuIDFromProductList(char *,char *);
unordered_map<wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
std::unordered_map<wstring, SONYDLC *>* 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<wstring, SONYDLC *> m_SONYDLCMap;
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
bool m_bVoiceChatAndUGCRestricted;

View file

@ -1509,7 +1509,7 @@ void FreeRichPresenceStrings()
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -205,7 +205,7 @@ private:
unsigned int m_searchResultCount;
// Rudp management and local players
unordered_map<int,SQRNetworkPlayer *> m_RudpCtxToPlayerMap;
std::unordered_map<int,SQRNetworkPlayer *> m_RudpCtxToPlayerMap;
bool CreateRudpConnections(SceNpMatching2RoomId roomId, SceNpMatching2RoomMemberId peerMemberId, int playerMask, SceNpMatching2RoomMemberId playersPeerMemberId);
SQRNetworkPlayer *GetPlayerFromRudpCtx(int rudpCtx);
SQRNetworkPlayer *GetPlayerFromRoomMemberAndLocalIdx(int roomMember, int localIdx);

View file

@ -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<SceNpMatching2RoomMemberId, bool> SonyVoiceChat::sm_bTalkingMap;
std::unordered_map<SceNpMatching2RoomMemberId, bool> SonyVoiceChat::sm_bTalkingMap;
bool SonyVoiceChat::sm_bCanStart = false;
bool SonyVoiceChat::sm_isChatRestricted = false;
int SonyVoiceChat::sm_currentBitrate = 28000;

View file

@ -117,7 +117,7 @@ private:
static uint8_t sm_micStatus;
static bool sm_bLoaded;
static bool sm_bUnloading;
static unordered_map<SceNpMatching2RoomMemberId, bool> sm_bTalkingMap;
static std::unordered_map<SceNpMatching2RoomMemberId, bool> 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;

View file

@ -10,7 +10,7 @@
#include <stddef.h>
#include <boost/typeof/typeof.hpp>
#include <boost/tr1/memory.hpp>
#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 <boost/mpl/equal_to.hpp>
@ -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<T>, class P = std::equal_to<T>, class A = boost::pool_allocator<T> >
// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = boost::pool_allocator<std::pair<const K,T> > >
// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// class std::unordered_map : public std::tr1::std::unordered_map<K, T, H, P, A >
// {};
@ -50,7 +50,7 @@ using boost::hash;
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = C4JPoolAllocator<std::pair<const K,T> > >
// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// class std::unordered_map : public std::tr1::std::unordered_map<K, T, H, P, A >
// {};

View file

@ -202,7 +202,7 @@ private:
// SonyCommerce::ProductInfoDetailed m_ProductInfoDetailed;
PRODUCTCODES ProductCodes;
unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
bool m_bVoiceChatAndUGCRestricted;

View file

@ -1388,7 +1388,7 @@ void FreeRichPresenceStrings()
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -1002,7 +1002,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -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<wstring, SONYDLC *>* pSONYDLCMap);
void SetDLCInfoMap(std::unordered_map<wstring, SONYDLC *>* pSONYDLCMap);
void EntitlementsCallback(bool bFoundEntitlements);
};

View file

@ -159,7 +159,7 @@ public:
bool DLCAlreadyPurchased(char *pchTitle);
char *GetSkuIDFromProductList();
void GetDLCSkuIDFromProductList(char *,char *);
unordered_map<wstring, SONYDLC *>* GetSonyDLCMap() { return &m_SONYDLCMap; }
std::unordered_map<wstring, SONYDLC *>* 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<wstring, SONYDLC *> m_SONYDLCMap;
std::unordered_map<wstring, SONYDLC *> m_SONYDLCMap;
bool m_bVoiceChatAndUGCRestricted;

View file

@ -1168,7 +1168,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -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<wchar_t, unsigned short>::value_type(i, translatorTable[i]) );
m_TranslatorMap.insert( std::unordered_map<wchar_t, unsigned short>::value_type(i, translatorTable[i]) );
}
pData += ATGCALCFONTFILEHEADERSIZE( m_cMaxGlyph + 1 );

View file

@ -106,7 +106,7 @@ public:
int m_iFontTexture;
private:
unordered_map<wchar_t, unsigned short> m_TranslatorMap;
std::unordered_map<wchar_t, unsigned short> m_TranslatorMap;
CharMetrics *m_characterMetrics;

View file

@ -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<float, XUI_Font *> m_loadedFonts[eFontData_MAX];
std::unordered_map<float, XUI_Font *> m_loadedFonts[eFontData_MAX];
public:
XUI_FontRenderer();

View file

@ -888,7 +888,7 @@ void SetRenderAndSamplerStates(IDirect3DDevice9 *pDevice,DWORD *RenderStateA,DWO
#ifdef MEMORY_TRACKING
int totalAllocGen = 0;
unordered_map<int,int> allocCounts;
std::unordered_map<int,int> allocCounts;
bool trackEnable = false;
bool trackStarted = false;
volatile size_t sizeCheckMin = 1160;

View file

@ -14,7 +14,7 @@ class EntityTracker
private:
ServerLevel *level;
unordered_set<std::shared_ptr<TrackedEntity> > entities;
unordered_map<int, std::shared_ptr<TrackedEntity> , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap
std::unordered_map<int, std::shared_ptr<TrackedEntity> , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap
int maxRange;
public:

View file

@ -369,7 +369,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
okToSend = true;
MinecraftServer::s_slowQueuePacketSent = true;
// static unordered_map<wstring,__int64> mapLastTime;
// static std::unordered_map<wstring,__int64> mapLastTime;
// __int64 thisTime = System::currentTimeMillis();
// __int64 lastTime = mapLastTime[connection->getNetworkPlayer()->GetUID().toString()];
// app.DebugPrintf(" - OK to send (%d ms since last)\n", thisTime - lastTime);

View file

@ -10,7 +10,7 @@ class EntityRenderDispatcher
public:
static void staticCtor(); // 4J added
private:
typedef unordered_map<eINSTANCEOF, EntityRenderer *, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToRendererMap;
typedef std::unordered_map<eINSTANCEOF, EntityRenderer *, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToRendererMap;
classToRendererMap renderers;
// 4J - was:
// Map<Class<? extends Entity>, EntityRenderer<? extends Entity>> renderers = new HashMap<Class<? extends Entity>, EntityRenderer<? extends Entity>>();

View file

@ -5,7 +5,7 @@ using namespace std;
class MobSpawnerRenderer : public TileEntityRenderer
{
private:
unordered_map<wstring, std::shared_ptr<Entity> > models;
std::unordered_map<wstring, std::shared_ptr<Entity> > models;
public:
virtual void render(std::shared_ptr<TileEntity> _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param
};

View file

@ -12,7 +12,7 @@ public:
static void staticCtor(); // 4J added
private:
typedef unordered_map<eINSTANCEOF, TileEntityRenderer *, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToTileRendererMap;
typedef std::unordered_map<eINSTANCEOF, TileEntityRenderer *, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToTileRendererMap;
classToTileRendererMap renderers;
public:

View file

@ -46,7 +46,7 @@ class TileRenderer
bool smoothShapeLighting;
Minecraft *minecraft;
///////////////////////////////////////// Data caching
unordered_map<int,int> getLightColorCount;
std::unordered_map<int,int> getLightColorCount;
int xMin, yMin, zMin;
int xMin2, yMin2, zMin2;
int getLightColor( Tile *tt, LevelSource *level, int x, int y, int z);

View file

@ -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<int, BlockDestructionProgress *>::value_type(id, entry) );
destroyingBlocks.insert( std::unordered_map<int, BlockDestructionProgress *>::value_type(id, entry) );
}
entry->setProgress(progress);

View file

@ -120,7 +120,7 @@ public:
void destroyTileProgress(int id, int x, int y, int z, int progress);
void registerTextures(IconRegister *iconRegister);
typedef unordered_map<int, vector<std::shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap;
typedef std::unordered_map<int, vector<std::shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap;
private:
// debug
@ -160,7 +160,7 @@ private:
static const int RENDERLISTS_LENGTH = 4; // 4J - added
OffsettedRenderList renderLists[RENDERLISTS_LENGTH];
unordered_map<int, BlockDestructionProgress *> destroyingBlocks;
std::unordered_map<int, BlockDestructionProgress *> destroyingBlocks;
Icon **breakingTextures;
public:

View file

@ -14,7 +14,7 @@ public:
bool riding;
vector<ModelPart *> cubes;
bool young;
unordered_map<wstring, TexOffs * > mappedTexOffs;
std::unordered_map<wstring, TexOffs * > mappedTexOffs;
int texWidth;
int texHeight;

View file

@ -21,7 +21,7 @@ private:
vector<TexturePack *> *texturePacks;
vector<TexturePack *> m_texturePacksToDelete;
unordered_map<DWORD, TexturePack *> cacheById;
std::unordered_map<DWORD, TexturePack *> cacheById;
TexturePack *selected;
TexturePack *lastSelected;

View file

@ -70,7 +70,7 @@ void PreStitchedTextureMap::stitch()
}
// Collection bucket for multiple frames per texture
unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
std::unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name);

View file

@ -23,7 +23,7 @@ private:
bool m_mipMap;
typedef unordered_map<wstring, Icon *> stringIconMap;
typedef std::unordered_map<wstring, Icon *> stringIconMap;
stringIconMap texturesByName; // = new HashMap<String, StitchedTexture>();
BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
StitchedTexture *missingPosition;

View file

@ -58,7 +58,7 @@ void TextureMap::stitch()
}
// Collection bucket for multiple frames per texture
unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
std::unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name);
@ -76,7 +76,7 @@ void TextureMap::stitch()
stitcher->addTexture(missingHolder);
vector<Texture *> *missingVec = new vector<Texture *>();
missingVec->push_back(missingTex);
textures.insert( unordered_map<TextureHolder *, vector<Texture *> * >::value_type( missingHolder, missingVec ));
textures.insert( std::unordered_map<TextureHolder *, vector<Texture *> * >::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<TextureHolder *, vector<Texture *> * >::value_type( holder, frames ) );
textures.insert( std::unordered_map<TextureHolder *, vector<Texture *> * >::value_type( holder, frames ) );
}
// Stitch!

View file

@ -21,7 +21,7 @@ private:
bool m_mipMap;
typedef unordered_map<wstring, StitchedTexture *> stringStitchedTextureMap;
typedef std::unordered_map<wstring, StitchedTexture *> stringStitchedTextureMap;
stringStitchedTextureMap texturesByName; // = new HashMap<String, StitchedTexture>();
BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
StitchedTexture *missingPosition;

View file

@ -10,8 +10,8 @@ private:
static TextureManager *instance;
int nextID;
typedef unordered_map<wstring, int> stringIntMap;
typedef unordered_map<int, Texture *> intTextureMap;
typedef std::unordered_map<wstring, int> stringIntMap;
typedef std::unordered_map<int, Texture *> intTextureMap;
intTextureMap idToTextureMap;
stringIntMap stringToIDMap;

View file

@ -1139,27 +1139,27 @@ void Textures::reloadAll()
#if 0
AUTO_VAR(itEndLI, loadedImages.end() );
for(unordered_map<int, BufferedImage *>::iterator it = loadedImages.begin(); it != itEndLI; it++ )
for(std::unordered_map<int, BufferedImage *>::iterator it = loadedImages.begin(); it != itEndLI; it++ )
{
BufferedImage *image = it->second;
loadTexture(image, it->first);
}
AUTO_VAR(itEndHT, httpTextures.end());
for(unordered_map<wstring, HttpTexture *>::iterator it = httpTextures.begin(); it != itEndHT; it++ )
for(std::unordered_map<wstring, HttpTexture *>::iterator it = httpTextures.begin(); it != itEndHT; it++ )
{
it->second->isLoaded = false;
}
AUTO_VAR(itEndMT, memTextures.end());
for(unordered_map<wstring, MemTexture *>::iterator it = memTextures.begin(); it != itEndMT; it++ )
for(std::unordered_map<wstring, MemTexture *>::iterator it = memTextures.begin(); it != itEndMT; it++ )
{
it->second->isLoaded = false;
}
AUTO_VAR(itEndIM, idMap.end());
for( unordered_map<wstring, int>::iterator it = idMap.begin(); it != itEndIM; it++ )
for( std::unordered_map<wstring, int>::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<wstring, intArray>::iterator it = pixelsMap.begin(); it != itEndPM; it++ )
for( std::unordered_map<wstring, intArray>::iterator it = pixelsMap.begin(); it != itEndPM; it++ )
{
wstring name = it->first;
BufferedImage *image = readImage(skin->getResource(name));

View file

@ -208,14 +208,14 @@ private:
static const wchar_t *preLoaded[TN_COUNT];
static int preLoadedIdx[TN_COUNT];
unordered_map<wstring, int> idMap;
unordered_map<wstring, intArray> pixelsMap;
unordered_map<int, BufferedImage *> loadedImages;
std::unordered_map<wstring, int> idMap;
std::unordered_map<wstring, intArray> pixelsMap;
std::unordered_map<int, BufferedImage *> loadedImages;
//IntBuffer *pixels; // 4J - removed so we don't have a permanent buffer kicking round using up 1MB
unordered_map<wstring, HttpTexture *> httpTextures;
std::unordered_map<wstring, HttpTexture *> httpTextures;
// 4J-PB - Added for GTS textures
unordered_map<wstring,MemTexture *> memTextures;
std::unordered_map<wstring,MemTexture *> memTextures;
Options *options;
private:

View file

@ -23,7 +23,7 @@ protected:
} MetaData, *PMetaData;
unordered_map<wstring, PMetaData> m_index;
std::unordered_map<wstring, PMetaData> m_index;
public:
void _readHeader(DataInputStream *dis);

View file

@ -4,7 +4,7 @@
#include "../../Minecraft.World/IO/Streams/ByteBuffer.h"
#include "../../Minecraft.World/IO/Streams/FloatBuffer.h"
unordered_map<int,int> MemoryTracker::GL_LIST_IDS;
std::unordered_map<int,int> MemoryTracker::GL_LIST_IDS;
vector<int> MemoryTracker::TEXTURE_IDS;
int MemoryTracker::genLists(int count)

View file

@ -12,7 +12,7 @@ using namespace std;
class MemoryTracker
{
private:
static unordered_map<int,int> GL_LIST_IDS;
static std::unordered_map<int,int> GL_LIST_IDS;
static vector<int> TEXTURE_IDS;
public:

View file

@ -87,7 +87,7 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
wstring stringId = dis2.readUTF();
wstring stringValue = dis2.readUTF();
m_stringsMap.insert( unordered_map<wstring, wstring>::value_type(stringId, stringValue) );
m_stringsMap.insert( std::unordered_map<wstring, wstring>::value_type(stringId, stringValue) );
}
}
else

View file

@ -15,7 +15,7 @@ class StringTable
private:
bool isStatic;
unordered_map<wstring, wstring> m_stringsMap;
std::unordered_map<wstring, wstring> m_stringsMap;
vector<wstring> m_stringsVec;
byteArray src;

View file

@ -6,7 +6,7 @@ class WstringLookup
{
private:
UINT numIDs;
unordered_map<wstring, UINT> str2int;
std::unordered_map<wstring, UINT> str2int;
vector<wstring> int2str;
public:

View file

@ -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<int, Node *>::value_type(i, node) );
nodes.insert( std::unordered_map<int, Node *>::value_type(i, node) );
}
else
{

View file

@ -12,7 +12,7 @@ private:
BinaryHeap openSet;
// 4J Jev, was a IntHashMap, thought this was close enough.
unordered_map<int, Node *, IntKeyHash, IntKeyEq> nodes;
std::unordered_map<int, Node *, IntKeyHash, IntKeyEq> nodes;
NodeArray *neighbors;

View file

@ -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<ChunkPos,bool,ChunkPosKeyHash,ChunkPosKeyEq> MobSpawner::chunksToPoll;
std::unordered_map<ChunkPos,bool,ChunkPosKeyHash,ChunkPosKeyEq> MobSpawner::chunksToPoll;
#endif
const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFriendlies)

View file

@ -22,7 +22,7 @@ private:
// AP - See CustomMap.h for an explanation of this
static CustomMap chunksToPoll;
#else
static unordered_map<ChunkPos,bool,ChunkPosKeyHash,ChunkPosKeyEq> chunksToPoll;
static std::unordered_map<ChunkPos,bool,ChunkPosKeyHash,ChunkPosKeyEq> chunksToPoll;
#endif
public:

View file

@ -4,7 +4,7 @@
#include "../Util/SoundTypes.h"
#include "../Headers/net.minecraft.world.h"
unordered_map<Level *, deque<NotGateTile::Toggle> *> NotGateTile::recentToggles = unordered_map<Level *, deque<NotGateTile::Toggle> *>();
std::unordered_map<Level *, deque<NotGateTile::Toggle> *> NotGateTile::recentToggles = std::unordered_map<Level *, deque<NotGateTile::Toggle> *>();
// 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.

View file

@ -31,7 +31,7 @@ public:
};
private:
static unordered_map<Level *, deque<Toggle> *> recentToggles; // 4J - brought forward change from 1.3.2
static std::unordered_map<Level *, deque<Toggle> *> recentToggles; // 4J - brought forward change from 1.3.2
public:
static void removeLevelReferences(Level *level); // 4J added
private:

View file

@ -98,7 +98,7 @@ const wstring PotionBrewing::MOD_GUNPOWDER = L""; // gunpowder makes them throwa
PotionBrewing::intStringMap PotionBrewing::potionEffectDuration;
PotionBrewing::intStringMap PotionBrewing::potionEffectAmplifier;
unordered_map<int, int> PotionBrewing::cachedColors;
std::unordered_map<int, int> PotionBrewing::cachedColors;
void PotionBrewing::staticCtor()
{

View file

@ -29,7 +29,7 @@ public:
static const wstring MOD_GOLDENCARROT;
private:
typedef unordered_map<int, wstring> intStringMap;
typedef std::unordered_map<int, wstring> intStringMap;
static intStringMap potionEffectDuration;
static intStringMap potionEffectAmplifier;
@ -57,7 +57,7 @@ public:
static int getColorValue(vector<MobEffectInstance *> *effects);
private:
static unordered_map<int, int> cachedColors;
static std::unordered_map<int, int> cachedColors;
public:
static int getColorValue(int brew, bool includeDisabledEffects);

View file

@ -8,8 +8,8 @@
TileEntity::idToCreateMapType TileEntity::idCreateMap = unordered_map<wstring, tileEntityCreateFn>();
TileEntity::classToIdMapType TileEntity::classIdMap = unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>();
TileEntity::idToCreateMapType TileEntity::idCreateMap = std::unordered_map<wstring, tileEntityCreateFn>();
TileEntity::classToIdMapType TileEntity::classIdMap = std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>();
void TileEntity::staticCtor()
{

View file

@ -16,8 +16,8 @@ public:
static void staticCtor();
virtual eINSTANCEOF GetType() { return eTYPE_TILEENTITY; }
private:
typedef unordered_map<wstring, tileEntityCreateFn> idToCreateMapType;
typedef unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToIdMapType;
typedef std::unordered_map<wstring, tileEntityCreateFn> idToCreateMapType;
typedef std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> classToIdMapType;
static idToCreateMapType idCreateMap;
static classToIdMapType classIdMap;
static void setId(tileEntityCreateFn createFn, eINSTANCEOF clas, wstring id);

View file

@ -7,9 +7,9 @@ class CommandDispatcher
{
private:
#ifdef __ORBIS__
unordered_map<EGameCommand, Command *,std::hash<int>> commandsById;
std::unordered_map<EGameCommand, Command *,std::hash<int>> commandsById;
#else
unordered_map<EGameCommand, Command *> commandsById;
std::unordered_map<EGameCommand, Command *> commandsById;
#endif
unordered_set<Command *> commands;

View file

@ -7,7 +7,7 @@
MenuBackup::MenuBackup(std::shared_ptr<Inventory> inventory, AbstractContainerMenu *menu)
{
backups = new unordered_map<short, ItemInstanceArray *>();
backups = new std::unordered_map<short, ItemInstanceArray *>();
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);
}

View file

@ -6,7 +6,7 @@ class Inventory;
class MenuBackup
{
private:
unordered_map<short, ItemInstanceArray *> *backups;
std::unordered_map<short, ItemInstanceArray *> *backups;
std::shared_ptr<Inventory> inventory;
AbstractContainerMenu *menu;

View file

@ -65,7 +65,7 @@ void RepairMenu::createResult()
{
std::shared_ptr<ItemInstance> result = input->copy();
std::shared_ptr<ItemInstance> addition = repairSlots->getItem(ADDITIONAL_SLOT);
unordered_map<int,int> *enchantments = EnchantmentHelper::getEnchantments(result);
std::unordered_map<int,int> *enchantments = EnchantmentHelper::getEnchantments(result);
bool usingBook = false;
tax += input->getBaseRepairCost() + (addition == NULL ? 0 : addition->getBaseRepairCost());
@ -132,7 +132,7 @@ void RepairMenu::createResult()
}
}
unordered_map<int, int> *additionalEnchantments = EnchantmentHelper::getEnchantments(addition);
std::unordered_map<int, int> *additionalEnchantments = EnchantmentHelper::getEnchantments(addition);
for(AUTO_VAR(it, additionalEnchantments->begin()); it != additionalEnchantments->end(); ++it)
{

View file

@ -33,9 +33,9 @@ int EnchantmentHelper::getEnchantmentLevel(int enchantmentId, std::shared_ptr<It
return 0;
}
unordered_map<int, int> *EnchantmentHelper::getEnchantments(std::shared_ptr<ItemInstance> item)
std::unordered_map<int, int> *EnchantmentHelper::getEnchantments(std::shared_ptr<ItemInstance> item)
{
unordered_map<int, int> *result = new unordered_map<int, int>();
std::unordered_map<int, int> *result = new std::unordered_map<int, int>();
ListTag<CompoundTag> *list = item->id == Item::enchantedBook_Id ? Item::enchantedBook->getEnchantments(item) : item->getEnchantmentTags();
if (list != NULL)
@ -45,14 +45,14 @@ unordered_map<int, int> *EnchantmentHelper::getEnchantments(std::shared_ptr<Item
int type = list->get(i)->getShort((wchar_t *)ItemInstance::TAG_ENCH_ID);
int level = list->get(i)->getShort((wchar_t *)ItemInstance::TAG_ENCH_LEVEL);
result->insert( unordered_map<int, int>::value_type(type, level));
result->insert( std::unordered_map<int, int>::value_type(type, level));
}
}
return result;
}
void EnchantmentHelper::setEnchantments(unordered_map<int, int> *enchantments, std::shared_ptr<ItemInstance> item)
void EnchantmentHelper::setEnchantments(std::unordered_map<int, int> *enchantments, std::shared_ptr<ItemInstance> item)
{
ListTag<CompoundTag> *list = new ListTag<CompoundTag>();
@ -357,7 +357,7 @@ vector<EnchantmentInstance *> *EnchantmentHelper::selectEnchantment(Random *rand
vector<EnchantmentInstance *> *results = NULL;
unordered_map<int, EnchantmentInstance *> *availableEnchantments = getAvailableEnchantmentResults(realValue, itemInstance);
std::unordered_map<int, EnchantmentInstance *> *availableEnchantments = getAvailableEnchantmentResults(realValue, itemInstance);
if (availableEnchantments != NULL && !availableEnchantments->empty())
{
vector<WeighedRandomItem *> values;
@ -433,10 +433,10 @@ vector<EnchantmentInstance *> *EnchantmentHelper::selectEnchantment(Random *rand
return results;
}
unordered_map<int, EnchantmentInstance *> *EnchantmentHelper::getAvailableEnchantmentResults(int value, std::shared_ptr<ItemInstance> itemInstance)
std::unordered_map<int, EnchantmentInstance *> *EnchantmentHelper::getAvailableEnchantmentResults(int value, std::shared_ptr<ItemInstance> itemInstance)
{
Item *item = itemInstance->getItem();
unordered_map<int, EnchantmentInstance *> *results = NULL;
std::unordered_map<int, EnchantmentInstance *> *results = NULL;
bool isBook = itemInstance->id == Item::book_Id;
@ -461,7 +461,7 @@ unordered_map<int, EnchantmentInstance *> *EnchantmentHelper::getAvailableEnchan
{
if (results == NULL)
{
results = new unordered_map<int, EnchantmentInstance *>();
results = new std::unordered_map<int, EnchantmentInstance *>();
}
AUTO_VAR(it, results->find(e->id));
if(it != results->end())

View file

@ -13,8 +13,8 @@ private:
public:
static int getEnchantmentLevel(int enchantmentId, std::shared_ptr<ItemInstance> piece);
static unordered_map<int, int> *getEnchantments(std::shared_ptr<ItemInstance> item);
static void setEnchantments(unordered_map<int, int> *enchantments, std::shared_ptr<ItemInstance> item);
static std::unordered_map<int, int> *getEnchantments(std::shared_ptr<ItemInstance> item);
static void setEnchantments(std::unordered_map<int, int> *enchantments, std::shared_ptr<ItemInstance> item);
static int getEnchantmentLevel(int enchantmentId, ItemInstanceArray inventory);
@ -106,5 +106,5 @@ public:
* @return
*/
static vector<EnchantmentInstance *> *selectEnchantment(Random *random, std::shared_ptr<ItemInstance> itemInstance, int enchantmentCost);
static unordered_map<int, EnchantmentInstance *> *getAvailableEnchantmentResults(int value, std::shared_ptr<ItemInstance> itemInstance);
static std::unordered_map<int, EnchantmentInstance *> *getAvailableEnchantmentResults(int value, std::shared_ptr<ItemInstance> itemInstance);
};

View file

@ -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<int, MobEffectInstance *>::value_type( id, new MobEffectInstance(id, duration, amplifier) ) );
activeEffects.insert( std::unordered_map<int, MobEffectInstance *>::value_type( id, new MobEffectInstance(id, duration, amplifier) ) );
}
}
}
@ -1783,7 +1783,7 @@ void Mob::addEffect(MobEffectInstance *newEffect)
}
else
{
activeEffects.insert( unordered_map<int, MobEffectInstance *>::value_type( newEffect->getId(), newEffect ) );
activeEffects.insert( std::unordered_map<int, MobEffectInstance *>::value_type( newEffect->getId(), newEffect ) );
onEffectAdded(newEffect);
}
}
@ -1804,7 +1804,7 @@ void Mob::addEffectNoUpdate(MobEffectInstance *newEffect)
}
else
{
activeEffects.insert( unordered_map<int, MobEffectInstance *>::value_type( newEffect->getId(), newEffect ) );
activeEffects.insert( std::unordered_map<int, MobEffectInstance *>::value_type( newEffect->getId(), newEffect ) );
}
}

View file

@ -17,8 +17,8 @@
#include "Villager.h"
#include <random>
unordered_map<int, pair<int,int> > Villager::MIN_MAX_VALUES;
unordered_map<int, pair<int,int> > Villager::MIN_MAX_PRICES;
std::unordered_map<int, pair<int,int> > Villager::MIN_MAX_VALUES;
std::unordered_map<int, pair<int,int> > Villager::MIN_MAX_PRICES;
void Villager::_init(int profession)
{

View file

@ -109,8 +109,8 @@ public:
void overrideOffers(MerchantRecipeList *recipeList);
private:
static unordered_map<int, pair<int,int> > MIN_MAX_VALUES;
static unordered_map<int, pair<int,int> > MIN_MAX_PRICES;
static std::unordered_map<int, pair<int,int> > MIN_MAX_VALUES;
static std::unordered_map<int, pair<int,int> > MIN_MAX_PRICES;
public:
static void staticCtor();

View file

@ -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<int, std::shared_ptr<DataItem> > itemsById;
std::unordered_map<int, std::shared_ptr<DataItem> > itemsById;
bool m_isDirty;
public:

View file

@ -48,7 +48,7 @@ private:
bool dirty;
int64_t lastWritten;
};
unordered_map<unsigned int, RegionFileReference *> regionFiles;
std::unordered_map<unsigned int, RegionFileReference *> regionFiles;
vector<WriteHistory> writeHistory;
int64_t m_lastTickTime;

View file

@ -14,7 +14,7 @@
class CompoundTag : public Tag
{
private:
unordered_map<wstring, Tag *> tags;
std::unordered_map<wstring, Tag *> tags;
public:
CompoundTag() : Tag(L"") {}
@ -23,7 +23,7 @@ public:
void write(DataOutput *dos)
{
AUTO_VAR(itEnd, tags.end());
for( unordered_map<wstring, Tag *>::iterator it = tags.begin(); it != itEnd; it++ )
for( std::unordered_map<wstring, Tag *>::iterator it = tags.begin(); it != itEnd; it++ )
{
Tag::writeNamedTag(it->second, dos);
}
@ -48,7 +48,7 @@ public:
vector<Tag *> *ret = new vector<Tag *>;
AUTO_VAR(itEnd, tags.end());
for( unordered_map<wstring, Tag *>::iterator it = tags.begin(); it != itEnd; it++ )
for( std::unordered_map<wstring, Tag *>::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<string, Tag *>::iterator it = tags.begin(); it != itEnd; it++ )
for( std::unordered_map<string, Tag *>::iterator it = tags.begin(); it != itEnd; it++ )
{
it->second->print(newPrefix, out);
}

View file

@ -15,7 +15,7 @@ public:
static const wstring CONTENTS_ICON;
private:
unordered_map<int, vector<MobEffectInstance *> *> cachedMobEffects;
std::unordered_map<int, vector<MobEffectInstance *> *> cachedMobEffects;
Icon *iconThrowable;
Icon *iconDrinkable;

View file

@ -25,7 +25,7 @@ public:
unordered_set<TilePos, TilePosKeyHash, TilePosKeyEq> toBlow;
private:
typedef unordered_map<std::shared_ptr<Player>, Vec3 * , PlayerKeyHash, PlayerKeyEq> playerVec3Map;
typedef std::unordered_map<std::shared_ptr<Player>, Vec3 * , PlayerKeyHash, PlayerKeyEq> playerVec3Map;
playerVec3Map hitPlayers;
public:

View file

@ -1529,7 +1529,7 @@ void LevelChunk::unload(bool unloadTileEntities) // 4J - added parameter
ListTag<CompoundTag> *tileEntityTags = new ListTag<CompoundTag>();
AUTO_VAR(itEnd,tileEntities.end());
for( unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = tileEntities.begin();
for( std::unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = tileEntities.begin();
it != itEnd; it++)
{
std::shared_ptr<TileEntity> te = it->second;

View file

@ -100,7 +100,7 @@ private:
bool hasGapsToCheck;
public:
unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq> tileEntities;
std::unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq> tileEntities;
vector<std::shared_ptr<Entity> > **entityBlocks;
static const int sTerrainPopulatedFromHere = 2;

View file

@ -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<PlayerUID, PlayerMappings, PlayerUID::Hash> m_playerMappings;
std::unordered_map<PlayerUID, PlayerMappings, PlayerUID::Hash> m_playerMappings;
#else
unordered_map<PlayerUID, PlayerMappings> m_playerMappings;
std::unordered_map<PlayerUID, PlayerMappings> m_playerMappings;
#endif
byteArray m_usedMappings;
#else
@ -95,7 +95,7 @@ private:
#endif
bool m_bHasLoadedMapDataMappings;
unordered_map<wstring, ByteArrayOutputStream *> m_cachedSaveData;
std::unordered_map<wstring, ByteArrayOutputStream *> m_cachedSaveData;
vector<short> m_mapFilesToDelete; // Temp list of files that couldn't be deleted immediately due to saving being disabled
protected:

View file

@ -14,29 +14,29 @@
#include "../../Headers/com.mojang.nbt.h"
#include "EntityIO.h"
unordered_map<wstring, entityCreateFn> *EntityIO::idCreateMap = new unordered_map<wstring, entityCreateFn>;
unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *EntityIO::classIdMap = new unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>;
unordered_map<int, entityCreateFn> *EntityIO::numCreateMap = new unordered_map<int, entityCreateFn>;
unordered_map<int, eINSTANCEOF> *EntityIO::numClassMap = new unordered_map<int, eINSTANCEOF>;
unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *EntityIO::classNumMap = new unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>;
unordered_map<wstring, int> *EntityIO::idNumMap = new unordered_map<wstring, int>;
unordered_map<int, EntityIO::SpawnableMobInfo *> EntityIO::idsSpawnableInCreative;
std::unordered_map<wstring, entityCreateFn> *EntityIO::idCreateMap = new std::unordered_map<wstring, entityCreateFn>;
std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *EntityIO::classIdMap = new std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>;
std::unordered_map<int, entityCreateFn> *EntityIO::numCreateMap = new std::unordered_map<int, entityCreateFn>;
std::unordered_map<int, eINSTANCEOF> *EntityIO::numClassMap = new std::unordered_map<int, eINSTANCEOF>;
std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *EntityIO::classNumMap = new std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>;
std::unordered_map<wstring, int> *EntityIO::idNumMap = new std::unordered_map<wstring, int>;
std::unordered_map<int, EntityIO::SpawnableMobInfo *> EntityIO::idsSpawnableInCreative;
void EntityIO::setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum)
{
idCreateMap->insert( unordered_map<wstring, entityCreateFn>::value_type(id, createFn) );
classIdMap->insert( unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::value_type(clas,id ) );
numCreateMap->insert( unordered_map<int, entityCreateFn>::value_type(idNum, createFn) );
numClassMap->insert( unordered_map<int, eINSTANCEOF>::value_type(idNum, clas) );
classNumMap->insert( unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::value_type(clas, idNum) );
idNumMap->insert( unordered_map<wstring, int>::value_type(id, idNum) );
idCreateMap->insert( std::unordered_map<wstring, entityCreateFn>::value_type(id, createFn) );
classIdMap->insert( std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::value_type(clas,id ) );
numCreateMap->insert( std::unordered_map<int, entityCreateFn>::value_type(idNum, createFn) );
numClassMap->insert( std::unordered_map<int, eINSTANCEOF>::value_type(idNum, clas) );
classNumMap->insert( std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::value_type(clas, idNum) );
idNumMap->insert( std::unordered_map<wstring, int>::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<int, SpawnableMobInfo *>::value_type( idNum, new SpawnableMobInfo(idNum, color1, color2, nameId) ) );
idsSpawnableInCreative.insert( std::unordered_map<int, SpawnableMobInfo *>::value_type( idNum, new SpawnableMobInfo(idNum, color1, color2, nameId) ) );
}
void EntityIO::staticCtor()
@ -161,7 +161,7 @@ std::shared_ptr<Entity> EntityIO::newByEnumType(eINSTANCEOF eType, Level *level)
{
std::shared_ptr<Entity> entity;
unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( eType );
std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( eType );
if( it != classNumMap->end() )
{
AUTO_VAR(it2, numCreateMap->find(it->second));
@ -177,13 +177,13 @@ std::shared_ptr<Entity> EntityIO::newByEnumType(eINSTANCEOF eType, Level *level)
int EntityIO::getId(std::shared_ptr<Entity> entity)
{
unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( entity->GetType() );
std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( entity->GetType() );
return (*it).second;
}
wstring EntityIO::getEncodeId(std::shared_ptr<Entity> entity)
{
unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classIdMap->find( entity->GetType() );
std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::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<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator classIdIt = classIdMap->find( it->second );
std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::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<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( eType );
std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq>::iterator it = classNumMap->find( eType );
if( it != classNumMap->end() )
return it->second;
return -1;

View file

@ -28,15 +28,15 @@ public:
};
private:
static unordered_map<wstring, entityCreateFn> *idCreateMap;
static unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classIdMap;
static unordered_map<int, entityCreateFn> *numCreateMap;
static unordered_map<int, eINSTANCEOF> *numClassMap;
static unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classNumMap;
static unordered_map<wstring, int> *idNumMap;
static std::unordered_map<wstring, entityCreateFn> *idCreateMap;
static std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classIdMap;
static std::unordered_map<int, entityCreateFn> *numCreateMap;
static std::unordered_map<int, eINSTANCEOF> *numClassMap;
static std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classNumMap;
static std::unordered_map<wstring, int> *idNumMap;
public:
static unordered_map<int, SpawnableMobInfo *> idsSpawnableInCreative;
static std::unordered_map<int, SpawnableMobInfo *> idsSpawnableInCreative;
private:
static void setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum);

View file

@ -309,7 +309,7 @@ void MapItemSavedData::tickCarriedBy(std::shared_ptr<Player> player, std::shared
}
#endif
//decorations.push_back(new MapDecoration(4, x, y, 0));
nonPlayerDecorations.insert( unordered_map<int, MapDecoration *>::value_type( END_PORTAL_DECORATION_KEY, new MapDecoration(4, x, y, 0, END_PORTAL_DECORATION_KEY, true) ) );
nonPlayerDecorations.insert( std::unordered_map<int, MapDecoration *>::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> player, std::shared
}
#endif
//decorations.push_back(new MapDecoration(7, x, y, 0));
nonPlayerDecorations.insert( unordered_map<int, MapDecoration *>::value_type( item->getFrame()->entityId, new MapDecoration(12, x, y, rot, item->getFrame()->entityId, true) ) );
nonPlayerDecorations.insert( std::unordered_map<int, MapDecoration *>::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> player, std::shared
}
#endif
//decorations.push_back(new MapDecoration(7, x, y, 0));
nonPlayerDecorations.insert( unordered_map<int, MapDecoration *>::value_type( ent->entityId, new MapDecoration(4, x, y, rot, ent->entityId, true) ) );
nonPlayerDecorations.insert( std::unordered_map<int, MapDecoration *>::value_type( ent->entityId, new MapDecoration(4, x, y, rot, ent->entityId, true) ) );
}
#endif

View file

@ -56,7 +56,7 @@ public:
vector<std::shared_ptr<HoldingPlayer> > carriedBy;
private:
typedef unordered_map<std::shared_ptr<Player> , std::shared_ptr<HoldingPlayer> , PlayerKeyHash, PlayerKeyEq> playerHoldingPlayerMapType;
typedef std::unordered_map<std::shared_ptr<Player> , std::shared_ptr<HoldingPlayer> , PlayerKeyHash, PlayerKeyEq> playerHoldingPlayerMapType;
playerHoldingPlayerMapType carriedByPlayers;
public:
@ -64,7 +64,7 @@ public:
private:
// 4J Stu added
unordered_map<int, MapDecoration *> nonPlayerDecorations;
std::unordered_map<int, MapDecoration *> nonPlayerDecorations;
static const int END_PORTAL_DECORATION_KEY;

View file

@ -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<DataOutputStream *> s_chunkDataQueue;
static int s_runningThreadCount;

View file

@ -268,7 +268,7 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, DataOutputStream *dos)
ListTag<CompoundTag> *tileEntityTags = new ListTag<CompoundTag>();
AUTO_VAR(itEnd, lc->tileEntities.end());
for( unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
for( std::unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
it != itEnd; it++)
{
std::shared_ptr<TileEntity> te = it->second;
@ -357,7 +357,7 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, CompoundTag *tag)
ListTag<CompoundTag> *tileEntityTags = new ListTag<CompoundTag>();
AUTO_VAR(itEnd, lc->tileEntities.end());
for( unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
for( std::unordered_map<TilePos, std::shared_ptr<TileEntity>, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
it != itEnd; it++)
{
std::shared_ptr<TileEntity> te = it->second;

View file

@ -9,7 +9,7 @@ class RegionFileCache
private:
static const int MAX_CACHE_SIZE = 256;
unordered_map<File, RegionFile *, FileKeyHash, FileKeyEq> cache;
std::unordered_map<File, RegionFile *, FileKeyHash, FileKeyEq> cache;
static RegionFileCache s_defaultCache;

View file

@ -11,9 +11,9 @@
SavedDataStorage::SavedDataStorage(LevelStorage *levelStorage)
{
/*
cache = new unordered_map<wstring, std::shared_ptr<SavedData> >;
cache = new std::unordered_map<wstring, std::shared_ptr<SavedData> >;
savedDatas = new vector<std::shared_ptr<SavedData> >;
usedAuxIds = new unordered_map<wstring, short*>;
usedAuxIds = new std::unordered_map<wstring, short*>;
*/
this->levelStorage = levelStorage;
@ -59,7 +59,7 @@ std::shared_ptr<SavedData> SavedDataStorage::get(const type_info& clazz, const w
if (data != NULL)
{
cache.insert( unordered_map<wstring, std::shared_ptr<SavedData> >::value_type( id , data ) );
cache.insert( std::unordered_map<wstring, std::shared_ptr<SavedData> >::value_type( id , data ) );
savedDatas.push_back(data);
}
return data;

View file

@ -9,12 +9,12 @@ class SavedDataStorage
private:
LevelStorage *levelStorage;
typedef unordered_map<wstring, std::shared_ptr<SavedData> > cacheMapType;
typedef std::unordered_map<wstring, std::shared_ptr<SavedData> > cacheMapType;
cacheMapType cache;
vector<std::shared_ptr<SavedData> > savedDatas;
typedef unordered_map<wstring, short> uaiMapType;
typedef std::unordered_map<wstring, short> uaiMapType;
uaiMapType usedAuxIds;
public:

View file

@ -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<TilePos, std::shared_ptr<TileEntity> , TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
for( std::unordered_map<TilePos, std::shared_ptr<TileEntity> , TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin();
it != lc->tileEntities.end(); it++)
{
std::shared_ptr<TileEntity> te = it->second;

View file

@ -30,7 +30,7 @@ public:
File dir;
private:
unordered_map<__int64, ZoneFile *> zoneFiles;
std::unordered_map<__int64, ZoneFile *> zoneFiles;
__int64 tickCount;
public:

View file

@ -163,14 +163,14 @@ Packet::Packet() : createTime( System::currentTimeMillis() )
shouldDelay = false;
}
unordered_map<int, packetCreateFn> Packet::idToCreateMap;
std::unordered_map<int, packetCreateFn> Packet::idToCreateMap;
unordered_set<int> Packet::clientReceivedPackets = unordered_set<int>();
unordered_set<int> Packet::serverReceivedPackets = unordered_set<int>();
unordered_set<int> Packet::sendToAnyClientPackets = unordered_set<int>();
// 4J Added
unordered_map<int, Packet::PacketStatistics *> Packet::outgoingStatistics = unordered_map<int, Packet::PacketStatistics *>();
std::unordered_map<int, Packet::PacketStatistics *> Packet::outgoingStatistics = std::unordered_map<int, Packet::PacketStatistics *>();
vector<Packet::PacketStatistics *> Packet::renderableStats = vector<Packet::PacketStatistics *>();
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<int, packetCreateFn>::value_type(id, createFn) );
idToCreateMap.insert( std::unordered_map<int, packetCreateFn>::value_type(id, createFn) );
#ifndef _CONTENT_PACKAGE
#if PACKET_ENABLE_STAT_TRACKING
@ -345,7 +345,7 @@ return id;
}
*/
unordered_map<int, Packet::PacketStatistics *> Packet::statistics = unordered_map<int, Packet::PacketStatistics *>();
std::unordered_map<int, Packet::PacketStatistics *> Packet::statistics = std::unordered_map<int, Packet::PacketStatistics *>();
//int Packet::nextPrint = 0;

View file

@ -47,7 +47,7 @@ public:
static void staticCtor();
public:
static unordered_map<int, packetCreateFn> idToCreateMap; // IntHashMap in 1.8.2 ... needed? // Made public in 1.0.1
static std::unordered_map<int, packetCreateFn> idToCreateMap; // IntHashMap in 1.8.2 ... needed? // Made public in 1.0.1
static unordered_set<int> clientReceivedPackets;
static unordered_set<int> serverReceivedPackets;
@ -76,7 +76,7 @@ public:
private:
// 4J Added to track stats for packets that are going out via QNet
static unordered_map<int, PacketStatistics *> outgoingStatistics; // IntHashMap in 1.8.2 ... needed?
static std::unordered_map<int, PacketStatistics *> outgoingStatistics; // IntHashMap in 1.8.2 ... needed?
static vector<PacketStatistics *> renderableStats;
static int renderPos;
public:
@ -87,7 +87,7 @@ public:
static __int64 getIndexedStatValue(unsigned int samplePos, unsigned int renderableId);
private :
static unordered_map<int, PacketStatistics *> statistics;
static std::unordered_map<int, PacketStatistics *> statistics;
//static int nextPrint;
public:

View file

@ -66,7 +66,7 @@ ItemInstance *FurnaceRecipes::getResult(int itemId)
return NULL;
}
unordered_map<int, ItemInstance *> *FurnaceRecipes::getRecipies()
std::unordered_map<int, ItemInstance *> *FurnaceRecipes::getRecipies()
{
return &recipies;
}

View file

@ -11,8 +11,8 @@ public:
private:
//Map<Integer, ItemInstance> recipies = new HashMap<Integer, ItemInstance>();
unordered_map<int, ItemInstance *> recipies;
unordered_map<int, float> recipeValue;
std::unordered_map<int, ItemInstance *> recipies;
std::unordered_map<int, float> 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<int, ItemInstance *> *getRecipies();
std::unordered_map<int, ItemInstance *> *getRecipies();
float getRecipeValue(int itemId);
};

View file

@ -942,7 +942,7 @@ ShapedRecipy *Recipes::addShapedRecipy(ItemInstance *result, ...)
int iCount;
ItemInstance **ids = NULL;
myMap *mappings = new unordered_map<wchar_t, ItemInstance *>();
myMap *mappings = new std::unordered_map<wchar_t, ItemInstance *>();
va_start(vl,result);
// 4J-PB - second argument is a list of the types

Some files were not shown because too many files have changed in this diff Show more