aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ArmorSlot.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/ArmorSlot.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/ArmorSlot.cpp')
-rw-r--r--Minecraft.World/ArmorSlot.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.World/ArmorSlot.cpp b/Minecraft.World/ArmorSlot.cpp
index 1efe0b71..c3006aaa 100644
--- a/Minecraft.World/ArmorSlot.cpp
+++ b/Minecraft.World/ArmorSlot.cpp
@@ -6,7 +6,7 @@
#include "net.minecraft.world.item.crafting.h"
#include "ArmorSlot.h"
-ArmorSlot::ArmorSlot(int slotNum, shared_ptr<Container> container, int id, int x, int y)
+ArmorSlot::ArmorSlot(int slotNum, std::shared_ptr<Container> container, int id, int x, int y)
: Slot( container, id, x, y ),
slotNum( slotNum )
{
@@ -17,7 +17,7 @@ int ArmorSlot::getMaxStackSize()
return 1;
}
-bool ArmorSlot::mayPlace(shared_ptr<ItemInstance> item)
+bool ArmorSlot::mayPlace(std::shared_ptr<ItemInstance> item)
{
if ( dynamic_cast<ArmorItem *>( item->getItem() ) != NULL)
{
@@ -36,9 +36,9 @@ Icon *ArmorSlot::getNoItemIcon()
}
//
-//bool ArmorSlot::mayCombine(shared_ptr<ItemInstance> item)
+//bool ArmorSlot::mayCombine(std::shared_ptr<ItemInstance> item)
//{
-// shared_ptr<ItemInstance> thisItemI = getItem();
+// std::shared_ptr<ItemInstance> thisItemI = getItem();
// if(thisItemI == NULL || item == NULL) return false;
//
// ArmorItem *thisItem = (ArmorItem *)thisItemI->getItem();
@@ -47,12 +47,12 @@ Icon *ArmorSlot::getNoItemIcon()
// return thisIsDyableArmor && itemIsDye;
//}
//
-//shared_ptr<ItemInstance> ArmorSlot::combine(shared_ptr<ItemInstance> item)
+//std::shared_ptr<ItemInstance> ArmorSlot::combine(std::shared_ptr<ItemInstance> item)
//{
-// shared_ptr<CraftingContainer> craftSlots = shared_ptr<CraftingContainer>( new CraftingContainer(NULL, 2, 2) );
+// std::shared_ptr<CraftingContainer> craftSlots = std::shared_ptr<CraftingContainer>( new CraftingContainer(NULL, 2, 2) );
// craftSlots->setItem(0, item);
// craftSlots->setItem(1, getItem()); // Armour item needs to go second
-// shared_ptr<ItemInstance> result = ArmorDyeRecipe::assembleDyedArmor(craftSlots);
+// std::shared_ptr<ItemInstance> result = ArmorDyeRecipe::assembleDyedArmor(craftSlots);
// craftSlots->setItem(0, nullptr);
// craftSlots->setItem(1, nullptr);
// return result;