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/DamageSource.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Minecraft.World/DamageSource.h') diff --git a/Minecraft.World/DamageSource.h b/Minecraft.World/DamageSource.h index 2e1d249d..ecfc2423 100644 --- a/Minecraft.World/DamageSource.h +++ b/Minecraft.World/DamageSource.h @@ -30,13 +30,13 @@ public: static DamageSource *anvil; static DamageSource *fallingBlock; - static DamageSource *mobAttack(shared_ptr mob); - static DamageSource *playerAttack(shared_ptr player); - static DamageSource *arrow(shared_ptr arrow, shared_ptr owner); - static DamageSource *fireball(shared_ptr fireball, shared_ptr owner); - static DamageSource *thrown(shared_ptr entity, shared_ptr owner); - static DamageSource *indirectMagic(shared_ptr entity, shared_ptr owner); - static DamageSource *thorns(shared_ptr source); + static DamageSource *mobAttack(std::shared_ptr mob); + static DamageSource *playerAttack(std::shared_ptr player); + static DamageSource *arrow(std::shared_ptr arrow, std::shared_ptr owner); + static DamageSource *fireball(std::shared_ptr fireball, std::shared_ptr owner); + static DamageSource *thrown(std::shared_ptr entity, std::shared_ptr owner); + static DamageSource *indirectMagic(std::shared_ptr entity, std::shared_ptr owner); + static DamageSource *thorns(std::shared_ptr source); private: bool _bypassArmor; @@ -66,8 +66,8 @@ protected: public: virtual ~DamageSource() {} - virtual shared_ptr getDirectEntity(); - virtual shared_ptr getEntity(); + virtual std::shared_ptr getDirectEntity(); + virtual std::shared_ptr getEntity(); protected: DamageSource *bypassArmor(); @@ -82,8 +82,8 @@ public: DamageSource *setMagic(); // 4J Stu - Made return a packet - //virtual wstring getLocalizedDeathMessage(shared_ptr player); - virtual shared_ptr getDeathMessagePacket(shared_ptr player); + //virtual wstring getLocalizedDeathMessage(std::shared_ptr player); + virtual std::shared_ptr getDeathMessagePacket(std::shared_ptr player); bool isFire(); ChatPacket::EChatPacketMessage getMsgId(); // 4J Stu - Used to return String -- cgit v1.2.3