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.World/NotGateTile.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.World/NotGateTile.cpp')
| -rw-r--r-- | Minecraft.World/NotGateTile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Minecraft.World/NotGateTile.cpp b/Minecraft.World/NotGateTile.cpp index 464e0ca5..3aa9aee1 100644 --- a/Minecraft.World/NotGateTile.cpp +++ b/Minecraft.World/NotGateTile.cpp @@ -28,10 +28,9 @@ bool NotGateTile::isToggledTooFrequently(Level *level, int x, int y, int z, bool if (add) recentToggles[level]->push_back(Toggle(x, y, z, level->getGameTime())); int count = 0; - AUTO_VAR(itEnd, recentToggles[level]->end()); - for (AUTO_VAR(it, recentToggles[level]->begin()); it != itEnd; it++) + for (const auto& it : *recentToggles[level]) { - if (it->x == x && it->y == y && it->z == z) + if (it.x == x && it.y == y && it.z == z) { count++; if (count >= MAX_RECENT_TOGGLES) @@ -122,7 +121,7 @@ void NotGateTile::tick(Level *level, int x, int y, int z, Random *random) } } - if (on) + if (on) { if (neighborSignal) { @@ -153,7 +152,7 @@ void NotGateTile::tick(Level *level, int x, int y, int z, Random *random) level->setTileAndData(x, y, z, Tile::redstoneTorch_on_Id, level->getData(x, y, z), Tile::UPDATE_ALL); } else - { + { app.DebugPrintf("Torch at (%d,%d,%d) has toggled too many times\n",x,y,z); } } @@ -236,9 +235,9 @@ void NotGateTile::levelTimeChanged(Level *level, __int64 delta, __int64 newTime) if (toggles != NULL) { - for (AUTO_VAR(it,toggles->begin()); it != toggles->end(); ++it) + for (auto& toggle : *toggles) { - (*it).when += delta; + toggle.when += delta; } } } |
