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/Slot.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Minecraft.World/Slot.h') diff --git a/Minecraft.World/Slot.h b/Minecraft.World/Slot.h index 6289ec0e..13827b5a 100644 --- a/Minecraft.World/Slot.h +++ b/Minecraft.World/Slot.h @@ -8,34 +8,34 @@ private: int slot; public: - shared_ptr container; + std::shared_ptr container; public: int index; int x, y; - Slot(shared_ptr container, int slot, int x, int y); + Slot(std::shared_ptr container, int slot, int x, int y); virtual ~Slot() {} - void onQuickCraft(shared_ptr picked, shared_ptr original); + void onQuickCraft(std::shared_ptr picked, std::shared_ptr original); protected: - virtual void onQuickCraft(shared_ptr picked, int count); - virtual void checkTakeAchievements(shared_ptr picked); + virtual void onQuickCraft(std::shared_ptr picked, int count); + virtual void checkTakeAchievements(std::shared_ptr picked); public: void swap(Slot *other); - virtual void onTake(shared_ptr player, shared_ptr carried); - virtual bool mayPlace(shared_ptr item); - virtual shared_ptr getItem(); + virtual void onTake(std::shared_ptr player, std::shared_ptr carried); + virtual bool mayPlace(std::shared_ptr item); + virtual std::shared_ptr getItem(); virtual bool hasItem(); - virtual void set(shared_ptr item); + virtual void set(std::shared_ptr item); virtual void setChanged(); virtual int getMaxStackSize(); virtual Icon *getNoItemIcon(); - virtual shared_ptr remove(int c); - virtual bool isAt(shared_ptr c, int s); - virtual bool mayPickup(shared_ptr player); - virtual bool mayCombine(shared_ptr item); // 4J Added - virtual shared_ptr combine(shared_ptr item); // 4J Added + virtual std::shared_ptr remove(int c); + virtual bool isAt(std::shared_ptr c, int s); + virtual bool mayPickup(std::shared_ptr player); + virtual bool mayCombine(std::shared_ptr item); // 4J Added + virtual std::shared_ptr combine(std::shared_ptr item); // 4J Added }; \ No newline at end of file -- cgit v1.2.3