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/PotionItem.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Minecraft.World/PotionItem.h') diff --git a/Minecraft.World/PotionItem.h b/Minecraft.World/PotionItem.h index d03d3308..0d5dd181 100644 --- a/Minecraft.World/PotionItem.h +++ b/Minecraft.World/PotionItem.h @@ -24,26 +24,26 @@ private: public: PotionItem(int id); - virtual vector *getMobEffects(shared_ptr potion); + virtual vector *getMobEffects(std::shared_ptr potion); virtual vector *getMobEffects(int auxValue); - virtual shared_ptr useTimeDepleted(shared_ptr instance, Level *level, shared_ptr player); - virtual int getUseDuration(shared_ptr itemInstance); - virtual UseAnim getUseAnimation(shared_ptr itemInstance); - virtual shared_ptr use(shared_ptr instance, Level *level, shared_ptr player); - virtual bool TestUse(Level *level, shared_ptr player); - virtual bool useOn(shared_ptr itemInstance, shared_ptr player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); + virtual std::shared_ptr useTimeDepleted(std::shared_ptr instance, Level *level, std::shared_ptr player); + virtual int getUseDuration(std::shared_ptr itemInstance); + virtual UseAnim getUseAnimation(std::shared_ptr itemInstance); + virtual std::shared_ptr use(std::shared_ptr instance, Level *level, std::shared_ptr player); + virtual bool TestUse(Level *level, std::shared_ptr player); + virtual bool useOn(std::shared_ptr itemInstance, std::shared_ptr player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); virtual Icon *getIcon(int auxValue); virtual Icon *getLayerIcon(int auxValue, int spriteLayer); static bool isThrowable(int auxValue); int getColor(int data); - virtual int getColor(shared_ptr item, int spriteLayer); + virtual int getColor(std::shared_ptr item, int spriteLayer); virtual bool hasMultipleSpriteLayers(); virtual bool hasInstantenousEffects(int itemAuxValue); - virtual wstring getHoverName(shared_ptr itemInstance); - virtual void appendHoverText(shared_ptr itemInstance, shared_ptr player, vector *lines, bool advanced, vector &unformattedStrings); - virtual bool isFoil(shared_ptr itemInstance); + virtual wstring getHoverName(std::shared_ptr itemInstance); + virtual void appendHoverText(std::shared_ptr itemInstance, std::shared_ptr player, vector *lines, bool advanced, vector &unformattedStrings); + virtual bool isFoil(std::shared_ptr itemInstance); - virtual unsigned int getUseDescriptionId(shared_ptr instance); + virtual unsigned int getUseDescriptionId(std::shared_ptr instance); //@Override void registerIcons(IconRegister *iconRegister); -- cgit v1.2.3