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.World/LeashItem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/LeashItem.cpp') diff --git a/Minecraft.World/LeashItem.cpp b/Minecraft.World/LeashItem.cpp index d8d7b3fc..ddb7878b 100644 --- a/Minecraft.World/LeashItem.cpp +++ b/Minecraft.World/LeashItem.cpp @@ -38,9 +38,9 @@ bool LeashItem::bindPlayerMobs(shared_ptr player, Level *level, int x, i vector > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range)); if (mobs != NULL) { - for(AUTO_VAR(it,mobs->begin()); it != mobs->end(); ++it) + for(auto& it : *mobs) { - shared_ptr mob = dynamic_pointer_cast(*it); + shared_ptr mob = dynamic_pointer_cast(it); if (mob->isLeashed() && mob->getLeashHolder() == player) { if (activeKnot == NULL) @@ -64,9 +64,9 @@ bool LeashItem::bindPlayerMobsTest(shared_ptr player, Level *level, int if (mobs != NULL) { - for(AUTO_VAR(it,mobs->begin()); it != mobs->end(); ++it) + for(auto& it : *mobs) { - shared_ptr mob = dynamic_pointer_cast(*it); + shared_ptr mob = dynamic_pointer_cast(it); if (mob->isLeashed() && mob->getLeashHolder() == player) return true; } } -- cgit v1.2.3