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.Client/Common/GameRules/LevelRuleset.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Minecraft.Client/Common/GameRules/LevelRuleset.cpp') 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 *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; } } -- cgit v1.2.3