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/Common/GameRules/LevelRuleset.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.Client/Common/GameRules/LevelRuleset.cpp')
| -rw-r--r-- | Minecraft.Client/Common/GameRules/LevelRuleset.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.Client/Common/GameRules/LevelRuleset.cpp b/Minecraft.Client/Common/GameRules/LevelRuleset.cpp index 1c7ecd47..658abe91 100644 --- a/Minecraft.Client/Common/GameRules/LevelRuleset.cpp +++ b/Minecraft.Client/Common/GameRules/LevelRuleset.cpp @@ -11,7 +11,7 @@ LevelRuleset::LevelRuleset() LevelRuleset::~LevelRuleset() { - for(AUTO_VAR(it, m_areas.begin()); it != m_areas.end(); ++it) + for (auto it = m_areas.begin(); it != m_areas.end(); ++it) { delete *it; } @@ -20,8 +20,8 @@ LevelRuleset::~LevelRuleset() void LevelRuleset::getChildren(vector<GameRuleDefinition *> *children) { CompoundGameRuleDefinition::getChildren(children); - for (AUTO_VAR(it, m_areas.begin()); it != m_areas.end(); it++) - children->push_back(*it); + for (const auto& area : m_areas) + children->push_back(area); } GameRuleDefinition *LevelRuleset::addChild(ConsoleGameRules::EGameRuleType ruleType) @@ -58,12 +58,12 @@ LPCWSTR LevelRuleset::getString(const wstring &key) AABB *LevelRuleset::getNamedArea(const wstring &areaName) { - AABB *area = NULL; - for(AUTO_VAR(it, m_areas.begin()); it != m_areas.end(); ++it) + AABB *area = nullptr; + for(auto& it : m_areas) { - if( (*it)->getName().compare(areaName) == 0 ) + if( it->getName().compare(areaName) == 0 ) { - area = (*it)->getArea(); + area = it->getArea(); break; } } |
