aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules/GameRule.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-05 17:17:45 -0600
committerGitHub <noreply@github.com>2026-03-05 17:17:45 -0600
commit0666959d312dc74903f55d1071488a90239330f1 (patch)
tree5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.Client/Common/GameRules/GameRule.cpp
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common/GameRules/GameRule.cpp')
-rw-r--r--Minecraft.Client/Common/GameRules/GameRule.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.Client/Common/GameRules/GameRule.cpp b/Minecraft.Client/Common/GameRules/GameRule.cpp
index 34d6196c..b37df84d 100644
--- a/Minecraft.Client/Common/GameRules/GameRule.cpp
+++ b/Minecraft.Client/Common/GameRules/GameRule.cpp
@@ -9,11 +9,11 @@ GameRule::GameRule(GameRuleDefinition *definition, Connection *connection)
GameRule::~GameRule()
{
- for(AUTO_VAR(it, m_parameters.begin()); it != m_parameters.end(); ++it)
+ for(auto& it : m_parameters )
{
- if(it->second.isPointer)
+ if(it.second.isPointer)
{
- delete it->second.gr;
+ delete it.second.gr;
}
}
}
@@ -59,12 +59,12 @@ void GameRule::write(DataOutputStream *dos)
{
// Find required parameters.
dos->writeInt(m_parameters.size());
- for (AUTO_VAR(it, m_parameters.begin()); it != m_parameters.end(); it++)
+ for ( const auto& parameter : m_parameters )
{
- wstring pName = (*it).first;
- ValueType vType = (*it).second;
-
- dos->writeUTF( (*it).first );
+ wstring pName = parameter.first;
+ ValueType vType = parameter.second;
+
+ dos->writeUTF( parameter.first );
dos->writeBoolean( vType.isPointer );
if (vType.isPointer)
@@ -80,7 +80,7 @@ void GameRule::read(DataInputStream *dis)
for (int i = 0; i < savedParams; i++)
{
wstring pNames = dis->readUTF();
-
+
ValueType vType = getParameter(pNames);
if (dis->readBoolean())