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/GoldenAppleItem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/GoldenAppleItem.cpp') diff --git a/Minecraft.World/GoldenAppleItem.cpp b/Minecraft.World/GoldenAppleItem.cpp index 6c99d201..8ed422a7 100644 --- a/Minecraft.World/GoldenAppleItem.cpp +++ b/Minecraft.World/GoldenAppleItem.cpp @@ -10,12 +10,12 @@ GoldenAppleItem::GoldenAppleItem(int id, int nutrition, float saturationMod, boo setStackedByData(true); } -bool GoldenAppleItem::isFoil(shared_ptr itemInstance) +bool GoldenAppleItem::isFoil(std::shared_ptr itemInstance) { return itemInstance->getAuxValue() > 0; } -const Rarity *GoldenAppleItem::getRarity(shared_ptr itemInstance) +const Rarity *GoldenAppleItem::getRarity(std::shared_ptr itemInstance) { if (itemInstance->getAuxValue() == 0) { @@ -24,7 +24,7 @@ const Rarity *GoldenAppleItem::getRarity(shared_ptr itemInstance) return Rarity::epic; } -void GoldenAppleItem::addEatEffect(shared_ptr instance, Level *level, shared_ptr player) +void GoldenAppleItem::addEatEffect(std::shared_ptr instance, Level *level, std::shared_ptr player) { if (instance->getAuxValue() > 0) { @@ -47,7 +47,7 @@ unsigned int GoldenAppleItem::getUseDescriptionId(int iData /*= -1*/) else return IDS_DESC_ENCHANTED_GOLDENAPPLE; } -unsigned int GoldenAppleItem::getUseDescriptionId(shared_ptr instance) +unsigned int GoldenAppleItem::getUseDescriptionId(std::shared_ptr instance) { return this->getUseDescriptionId(instance->getAuxValue()); } \ No newline at end of file -- cgit v1.2.3