diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-06 02:11:18 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:11:18 +0700 |
| commit | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch) | |
| tree | 953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.Client/StringTable.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.Client/StringTable.cpp')
| -rw-r--r-- | Minecraft.Client/StringTable.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Minecraft.Client/StringTable.cpp b/Minecraft.Client/StringTable.cpp index a29da179..e4baecac 100644 --- a/Minecraft.Client/StringTable.cpp +++ b/Minecraft.Client/StringTable.cpp @@ -48,24 +48,23 @@ void StringTable::ProcessStringTableData(void) int dataSize = 0; // - for( AUTO_VAR(it_locales, locales.begin()); - it_locales!=locales.end() && (!foundLang); - it_locales++ - ) - { + for (auto it_locales = locales.begin(); + it_locales != locales.end() && (!foundLang); + ++it_locales) + { bytesToSkip = 0; - for(AUTO_VAR(it, langSizeMap.begin()); it != langSizeMap.end(); ++it) + for(auto& it : langSizeMap) { - if(it->first.compare(*it_locales) == 0) + if(it.first.compare(*it_locales) == 0) { app.DebugPrintf("StringTable:: Found language '%ls'.\n", it_locales->c_str()); - dataSize = it->second; + dataSize = it.second; foundLang = true; break; } - bytesToSkip += it->second; + bytesToSkip += it.second; } if (!foundLang) @@ -87,7 +86,7 @@ void StringTable::ProcessStringTableData(void) // Read the language file for the selected language int langVersion = dis2.readInt(); - isStatic = false; // 4J-JEV: Versions 1 and up could use + isStatic = false; // 4J-JEV: Versions 1 and up could use if (langVersion > 0) // integers rather than wstrings as keys. isStatic = dis2.readBoolean(); @@ -152,9 +151,9 @@ LPCWSTR StringTable::getString(const wstring &id) } #endif - AUTO_VAR(it, m_stringsMap.find(id) ); + auto it = m_stringsMap.find(id); - if(it != m_stringsMap.end()) + if(it != m_stringsMap.end()) { return it->second.c_str(); } |
