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/HurtByTargetGoal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Minecraft.World/HurtByTargetGoal.cpp') diff --git a/Minecraft.World/HurtByTargetGoal.cpp b/Minecraft.World/HurtByTargetGoal.cpp index 32bcd3c7..076e5b6a 100644 --- a/Minecraft.World/HurtByTargetGoal.cpp +++ b/Minecraft.World/HurtByTargetGoal.cpp @@ -26,9 +26,9 @@ void HurtByTargetGoal::start() { double within = getFollowDistance(); vector > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within)); - for(AUTO_VAR(it, nearby->begin()); it != nearby->end(); ++it) + for(auto& it : *nearby) { - shared_ptr other = dynamic_pointer_cast(*it); + shared_ptr other = dynamic_pointer_cast(it); if (this->mob->shared_from_this() == other) continue; if (other->getTarget() != NULL) continue; if (other->isAlliedTo(mob->getLastHurtByMob())) continue; // don't target allies -- cgit v1.2.3