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/RandomPos.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/RandomPos.cpp') diff --git a/Minecraft.World/RandomPos.cpp b/Minecraft.World/RandomPos.cpp index c2cfd908..a12c93a9 100644 --- a/Minecraft.World/RandomPos.cpp +++ b/Minecraft.World/RandomPos.cpp @@ -5,12 +5,12 @@ Vec3 *RandomPos::tempDir = Vec3::newPermanent(0, 0, 0); -Vec3 *RandomPos::getPos(shared_ptr mob, int xzDist, int yDist, int quadrant/*=-1*/) // 4J - added quadrant +Vec3 *RandomPos::getPos(std::shared_ptr mob, int xzDist, int yDist, int quadrant/*=-1*/) // 4J - added quadrant { return generateRandomPos(mob, xzDist, yDist, NULL, quadrant); } -Vec3 *RandomPos::getPosTowards(shared_ptr mob, int xzDist, int yDist, Vec3 *towardsPos) +Vec3 *RandomPos::getPosTowards(std::shared_ptr mob, int xzDist, int yDist, Vec3 *towardsPos) { tempDir->x = towardsPos->x - mob->x; tempDir->y = towardsPos->y - mob->y; @@ -18,7 +18,7 @@ Vec3 *RandomPos::getPosTowards(shared_ptr mob, int xzDist, int yD return generateRandomPos(mob, xzDist, yDist, tempDir); } -Vec3 *RandomPos::getPosAvoid(shared_ptr mob, int xzDist, int yDist, Vec3 *avoidPos) +Vec3 *RandomPos::getPosAvoid(std::shared_ptr mob, int xzDist, int yDist, Vec3 *avoidPos) { tempDir->x = mob->x - avoidPos->x; tempDir->y = mob->y - avoidPos->y; @@ -26,7 +26,7 @@ Vec3 *RandomPos::getPosAvoid(shared_ptr mob, int xzDist, int yDis return generateRandomPos(mob, xzDist, yDist, tempDir); } -Vec3 *RandomPos::generateRandomPos(shared_ptr mob, int xzDist, int yDist, Vec3 *dir, int quadrant/*=-1*/) // 4J - added quadrant +Vec3 *RandomPos::generateRandomPos(std::shared_ptr mob, int xzDist, int yDist, Vec3 *dir, int quadrant/*=-1*/) // 4J - added quadrant { Random *random = mob->getRandom(); bool hasBest = false; -- cgit v1.2.3