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/Animal.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Minecraft.World/Animal.h') diff --git a/Minecraft.World/Animal.h b/Minecraft.World/Animal.h index 8c0cda8e..987b360e 100644 --- a/Minecraft.World/Animal.h +++ b/Minecraft.World/Animal.h @@ -26,10 +26,10 @@ public: virtual void aiStep(); protected: - virtual void checkHurtTarget(shared_ptr target, float d); + virtual void checkHurtTarget(std::shared_ptr target, float d); private: - virtual void breedWith(shared_ptr target); + virtual void breedWith(std::shared_ptr target); public: virtual float getWalkTargetValue(int x, int y, int z); @@ -40,7 +40,7 @@ public: virtual void readAdditionalSaveData(CompoundTag *tag); protected: - virtual shared_ptr findAttackTarget(); + virtual std::shared_ptr findAttackTarget(); public: virtual bool canSpawn(); @@ -48,22 +48,22 @@ public: protected: virtual bool removeWhenFarAway(); - virtual int getExperienceReward(shared_ptr killedBy); + virtual int getExperienceReward(std::shared_ptr killedBy); public: - virtual bool isFood(shared_ptr itemInstance); - virtual bool interact(shared_ptr player); + virtual bool isFood(std::shared_ptr itemInstance); + virtual bool interact(std::shared_ptr player); protected: int getInLoveValue(); // 4J added public: void setInLoveValue(int value); // 4J added - void setInLove(shared_ptr player); // 4J added, then modified to match latest Java for XboxOne achievements - shared_ptr getLoveCause(); + void setInLove(std::shared_ptr player); // 4J added, then modified to match latest Java for XboxOne achievements + std::shared_ptr getLoveCause(); bool isInLove(); void resetLove(); - virtual bool canMate(shared_ptr partner); + virtual bool canMate(std::shared_ptr partner); // 4J added for determining whether animals are enclosed or not private: -- cgit v1.2.3