From 7074f35e4ba831e358117842b99ee35b87f85ae5 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:58:20 +0700 Subject: shared_ptr -> std::shared_ptr This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today. --- Minecraft.World/RestrictOpenDoorGoal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/RestrictOpenDoorGoal.cpp') diff --git a/Minecraft.World/RestrictOpenDoorGoal.cpp b/Minecraft.World/RestrictOpenDoorGoal.cpp index e8620a71..2849aabc 100644 --- a/Minecraft.World/RestrictOpenDoorGoal.cpp +++ b/Minecraft.World/RestrictOpenDoorGoal.cpp @@ -13,9 +13,9 @@ RestrictOpenDoorGoal::RestrictOpenDoorGoal(PathfinderMob *mob) bool RestrictOpenDoorGoal::canUse() { if (mob->level->isDay()) return false; - shared_ptr village = mob->level->villages->getClosestVillage(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z), 16); + std::shared_ptr village = mob->level->villages->getClosestVillage(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z), 16); if (village == NULL) return false; - shared_ptr _doorInfo = village->getClosestDoorInfo(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)); + std::shared_ptr _doorInfo = village->getClosestDoorInfo(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)); if (_doorInfo == NULL) return false; doorInfo = _doorInfo; return _doorInfo->distanceToInsideSqr(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)) < 1.5 * 1.5; @@ -24,7 +24,7 @@ bool RestrictOpenDoorGoal::canUse() bool RestrictOpenDoorGoal::canContinueToUse() { if (mob->level->isDay()) return false; - shared_ptr _doorInfo = doorInfo.lock(); + std::shared_ptr _doorInfo = doorInfo.lock(); if ( _doorInfo == NULL ) return false; return !_doorInfo->removed && _doorInfo->isInsideSide(Mth::floor(mob->x), Mth::floor(mob->z)); } @@ -44,6 +44,6 @@ void RestrictOpenDoorGoal::stop() void RestrictOpenDoorGoal::tick() { - shared_ptr _doorInfo = doorInfo.lock(); + std::shared_ptr _doorInfo = doorInfo.lock(); if ( _doorInfo ) _doorInfo->incBookingCount(); } \ No newline at end of file -- cgit v1.2.3