From 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b Mon Sep 17 00:00:00 2001 From: void_17 <61356189+void2012@users.noreply.github.com> Date: Fri, 6 Mar 2026 02:11:18 +0700 Subject: Remove AUTO_VAR macro and _toString function (#592) --- Minecraft.World/EntityIO.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Minecraft.World/EntityIO.cpp') diff --git a/Minecraft.World/EntityIO.cpp b/Minecraft.World/EntityIO.cpp index 4532e8dd..086015dc 100644 --- a/Minecraft.World/EntityIO.cpp +++ b/Minecraft.World/EntityIO.cpp @@ -131,7 +131,7 @@ shared_ptr EntityIO::newEntity(const wstring& id, Level *level) { shared_ptr entity; - AUTO_VAR(it, idCreateMap->find(id)); + auto it = idCreateMap->find(id); if(it != idCreateMap->end() ) { entityCreateFn create = it->second; @@ -169,7 +169,7 @@ shared_ptr EntityIO::loadStatic(CompoundTag *tag, Level *level) tag->remove(L"Type"); } - AUTO_VAR(it, idCreateMap->find(tag->getString(L"id"))); + auto it = idCreateMap->find(tag->getString(L"id")); if(it != idCreateMap->end() ) { entityCreateFn create = it->second; @@ -197,7 +197,7 @@ shared_ptr EntityIO::newById(int id, Level *level) { shared_ptr entity; - AUTO_VAR(it, numCreateMap->find(id)); + auto it = numCreateMap->find(id); if(it != numCreateMap->end() ) { entityCreateFn create = it->second; @@ -222,10 +222,10 @@ shared_ptr EntityIO::newByEnumType(eINSTANCEOF eType, Level *level) { shared_ptr entity; - unordered_map::iterator it = classNumMap->find( eType ); + auto it = classNumMap->find( eType ); if( it != classNumMap->end() ) { - AUTO_VAR(it2, numCreateMap->find(it->second)); + auto it2 = numCreateMap->find(it->second); if(it2 != numCreateMap->end() ) { entityCreateFn create = it2->second; @@ -257,7 +257,7 @@ wstring EntityIO::getEncodeId(shared_ptr entity) int EntityIO::getId(const wstring &encodeId) { - AUTO_VAR(it, idNumMap->find(encodeId)); + auto it = idNumMap->find(encodeId); if (it == idNumMap->end()) { // defaults to pig... @@ -274,7 +274,7 @@ wstring EntityIO::getEncodeId(int entityIoValue) //return classIdMap.get(class1); //} - AUTO_VAR(it, numClassMap->find(entityIoValue)); + auto it = numClassMap->find(entityIoValue); if(it != numClassMap->end() ) { unordered_map::iterator classIdIt = classIdMap->find( it->second ); @@ -291,7 +291,7 @@ int EntityIO::getNameId(int entityIoValue) { int id = -1; - AUTO_VAR(it, idsSpawnableInCreative.find(entityIoValue)); + auto it = idsSpawnableInCreative.find(entityIoValue); if(it != idsSpawnableInCreative.end()) { id = it->second->nameId; @@ -302,7 +302,7 @@ int EntityIO::getNameId(int entityIoValue) eINSTANCEOF EntityIO::getType(const wstring &idString) { - AUTO_VAR(it, numClassMap->find(getId(idString))); + auto it = numClassMap->find(getId(idString)); if(it != numClassMap->end() ) { return it->second; @@ -312,7 +312,7 @@ eINSTANCEOF EntityIO::getType(const wstring &idString) eINSTANCEOF EntityIO::getClass(int id) { - AUTO_VAR(it, numClassMap->find(id)); + auto it = numClassMap->find(id); if(it != numClassMap->end() ) { return it->second; -- cgit v1.2.3