aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ArmorItem.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/ArmorItem.cpp
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
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.
Diffstat (limited to 'Minecraft.World/ArmorItem.cpp')
-rw-r--r--Minecraft.World/ArmorItem.cpp12
1 files changed, 6 insertions, 6 deletions
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<ItemInstance> item, int spriteLayer)
+int ArmorItem::getColor(std::shared_ptr<ItemInstance> item, int spriteLayer)
{
if (spriteLayer > 0)
{
@@ -116,7 +116,7 @@ const _ArmorMaterial *ArmorItem::getMaterial()
return armorType;
}
-bool ArmorItem::hasCustomColor(shared_ptr<ItemInstance> item)
+bool ArmorItem::hasCustomColor(std::shared_ptr<ItemInstance> item)
{
if (armorType != ArmorMaterial::CLOTH) return false;
if (!item->hasTag()) return false;
@@ -126,7 +126,7 @@ bool ArmorItem::hasCustomColor(shared_ptr<ItemInstance> item)
return true;
}
-int ArmorItem::getColor(shared_ptr<ItemInstance> item)
+int ArmorItem::getColor(std::shared_ptr<ItemInstance> 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<ItemInstance> item)
+void ArmorItem::clearColor(std::shared_ptr<ItemInstance> item)
{
if (armorType != ArmorMaterial::CLOTH) return;
CompoundTag *tag = item->getTag();
@@ -164,7 +164,7 @@ void ArmorItem::clearColor(shared_ptr<ItemInstance> item)
if (display->contains(L"color")) display->remove(L"color");
}
-void ArmorItem::setColor(shared_ptr<ItemInstance> item, int color)
+void ArmorItem::setColor(std::shared_ptr<ItemInstance> item, int color)
{
if (armorType != ArmorMaterial::CLOTH)
{
@@ -189,7 +189,7 @@ void ArmorItem::setColor(shared_ptr<ItemInstance> item, int color)
display->putInt(L"color", color);
}
-bool ArmorItem::isValidRepairItem(shared_ptr<ItemInstance> source, shared_ptr<ItemInstance> repairItem)
+bool ArmorItem::isValidRepairItem(std::shared_ptr<ItemInstance> source, std::shared_ptr<ItemInstance> repairItem)
{
if (armorType->getTierItemId() == repairItem->id)
{