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/ArmorItem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/ArmorItem.cpp') diff --git a/Minecraft.World/ArmorItem.cpp b/Minecraft.World/ArmorItem.cpp index 0b2c24e4..be7f6b9d 100644 --- a/Minecraft.World/ArmorItem.cpp +++ b/Minecraft.World/ArmorItem.cpp @@ -88,7 +88,7 @@ ArmorItem::ArmorItem(int id, const ArmorMaterial *armorType, int icon, int slot) maxStackSize = 1; } -int ArmorItem::getColor(shared_ptr item, int spriteLayer) +int ArmorItem::getColor(std::shared_ptr item, int spriteLayer) { if (spriteLayer > 0) { @@ -116,7 +116,7 @@ const _ArmorMaterial *ArmorItem::getMaterial() return armorType; } -bool ArmorItem::hasCustomColor(shared_ptr item) +bool ArmorItem::hasCustomColor(std::shared_ptr item) { if (armorType != ArmorMaterial::CLOTH) return false; if (!item->hasTag()) return false; @@ -126,7 +126,7 @@ bool ArmorItem::hasCustomColor(shared_ptr item) return true; } -int ArmorItem::getColor(shared_ptr item) +int ArmorItem::getColor(std::shared_ptr item) { if (armorType != ArmorMaterial::CLOTH) return -1; @@ -155,7 +155,7 @@ Icon *ArmorItem::getLayerIcon(int auxValue, int spriteLayer) return Item::getLayerIcon(auxValue, spriteLayer); } -void ArmorItem::clearColor(shared_ptr item) +void ArmorItem::clearColor(std::shared_ptr item) { if (armorType != ArmorMaterial::CLOTH) return; CompoundTag *tag = item->getTag(); @@ -164,7 +164,7 @@ void ArmorItem::clearColor(shared_ptr item) if (display->contains(L"color")) display->remove(L"color"); } -void ArmorItem::setColor(shared_ptr item, int color) +void ArmorItem::setColor(std::shared_ptr item, int color) { if (armorType != ArmorMaterial::CLOTH) { @@ -189,7 +189,7 @@ void ArmorItem::setColor(shared_ptr item, int color) display->putInt(L"color", color); } -bool ArmorItem::isValidRepairItem(shared_ptr source, shared_ptr repairItem) +bool ArmorItem::isValidRepairItem(std::shared_ptr source, std::shared_ptr repairItem) { if (armorType->getTierItemId() == repairItem->id) { -- cgit v1.2.3