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/ResultContainer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Minecraft.World/ResultContainer.cpp') diff --git a/Minecraft.World/ResultContainer.cpp b/Minecraft.World/ResultContainer.cpp index c28b3cf3..782c2aa8 100644 --- a/Minecraft.World/ResultContainer.cpp +++ b/Minecraft.World/ResultContainer.cpp @@ -12,7 +12,7 @@ unsigned int ResultContainer::getContainerSize() return 1; } -shared_ptr ResultContainer::getItem(unsigned int slot) +std::shared_ptr ResultContainer::getItem(unsigned int slot) { return (*items)[0]; } @@ -22,29 +22,29 @@ int ResultContainer::getName() return 0; } -shared_ptr ResultContainer::removeItem(unsigned int slot, int count) +std::shared_ptr ResultContainer::removeItem(unsigned int slot, int count) { if ((*items)[0] != NULL) { - shared_ptr item = (*items)[0]; + std::shared_ptr item = (*items)[0]; (*items)[0] = nullptr; return item; } return nullptr; } -shared_ptr ResultContainer::removeItemNoUpdate(int slot) +std::shared_ptr ResultContainer::removeItemNoUpdate(int slot) { if ((*items)[0] != NULL) { - shared_ptr item = (*items)[0]; + std::shared_ptr item = (*items)[0]; (*items)[0] = nullptr; return item; } return nullptr; } -void ResultContainer::setItem(unsigned int slot, shared_ptr item) +void ResultContainer::setItem(unsigned int slot, std::shared_ptr item) { (*items)[0] = item; } @@ -58,7 +58,7 @@ void ResultContainer::setChanged() { } -bool ResultContainer::stillValid(shared_ptr player) +bool ResultContainer::stillValid(std::shared_ptr player) { return true; } \ No newline at end of file -- cgit v1.2.3