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/Path.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.World/Path.cpp') diff --git a/Minecraft.World/Path.cpp b/Minecraft.World/Path.cpp index 538917f6..61bd055e 100644 --- a/Minecraft.World/Path.cpp +++ b/Minecraft.World/Path.cpp @@ -13,7 +13,7 @@ Path::~Path() } } -Path::Path(NodeArray nodes) +Path::Path(NodeArray nodes) { index = 0; @@ -30,26 +30,26 @@ Path::Path(NodeArray nodes) } } -void Path::next() +void Path::next() { index++; } -bool Path::isDone() +bool Path::isDone() { return index >= length; } -Node *Path::last() +Node *Path::last() { - if (length > 0) + if (length > 0) { return nodes[length - 1]; } return NULL; } -Node *Path::get(int i) +Node *Path::get(int i) { return nodes[i]; } @@ -74,7 +74,7 @@ void Path::setIndex(int index) this->index = index; } -Vec3 *Path::getPos(shared_ptr e, int index) +Vec3 *Path::getPos(std::shared_ptr e, int index) { double x = nodes[index]->x + (int) (e->bbWidth + 1) * 0.5; double y = nodes[index]->y; @@ -82,7 +82,7 @@ Vec3 *Path::getPos(shared_ptr e, int index) return Vec3::newTemp(x, y, z); } -Vec3 *Path::currentPos(shared_ptr e) +Vec3 *Path::currentPos(std::shared_ptr e) { return getPos(e, index); } -- cgit v1.2.3