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/EnderMan.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/EnderMan.cpp') diff --git a/Minecraft.World/EnderMan.cpp b/Minecraft.World/EnderMan.cpp index abfc5cb5..e5995587 100644 --- a/Minecraft.World/EnderMan.cpp +++ b/Minecraft.World/EnderMan.cpp @@ -83,16 +83,16 @@ void EnderMan::readAdditionalSaveData(CompoundTag *tag) setCarryingData(tag->getShort(L"carryingData")); } -shared_ptr EnderMan::findAttackTarget() +std::shared_ptr EnderMan::findAttackTarget() { #ifndef _FINAL_BUILD if(app.GetMobsDontAttackEnabled()) { - return shared_ptr(); + return std::shared_ptr(); } #endif - shared_ptr player = level->getNearestAttackablePlayer(shared_from_this(), 64); + std::shared_ptr player = level->getNearestAttackablePlayer(shared_from_this(), 64); if (player != NULL) { if (isLookingAtMe(player)) @@ -112,9 +112,9 @@ shared_ptr EnderMan::findAttackTarget() return nullptr; } -bool EnderMan::isLookingAtMe(shared_ptr player) +bool EnderMan::isLookingAtMe(std::shared_ptr player) { - shared_ptr helmet = player->inventory->armor[3]; + std::shared_ptr helmet = player->inventory->armor[3]; if (helmet != NULL && helmet->id == Tile::pumpkin_Id) return false; Vec3 *look = player->getViewVector(1)->normalize(); @@ -250,7 +250,7 @@ bool EnderMan::teleport() return teleport(xx, yy, zz); } -bool EnderMan::teleportTowards(shared_ptr e) +bool EnderMan::teleportTowards(std::shared_ptr e) { Vec3 *dir = Vec3::newTemp(x - e->x, bb->y0 + bbHeight / 2 - e->y + e->getHeadHeight(), z - e->z); dir = dir->normalize(); -- cgit v1.2.3