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/ArmorDyeRecipe.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Minecraft.World/ArmorDyeRecipe.cpp') diff --git a/Minecraft.World/ArmorDyeRecipe.cpp b/Minecraft.World/ArmorDyeRecipe.cpp index 3b74a8bb..8c5f52e0 100644 --- a/Minecraft.World/ArmorDyeRecipe.cpp +++ b/Minecraft.World/ArmorDyeRecipe.cpp @@ -5,14 +5,14 @@ #include "net.minecraft.world.item.crafting.h" #include "ArmorDyeRecipe.h" -bool ArmorDyeRecipe::matches(shared_ptr craftSlots, Level *level) +bool ArmorDyeRecipe::matches(std::shared_ptr craftSlots, Level *level) { - shared_ptr target = nullptr; - vector > dyes; + std::shared_ptr target = nullptr; + vector > dyes; for (int slot = 0; slot < craftSlots->getContainerSize(); slot++) { - shared_ptr item = craftSlots->getItem(slot); + std::shared_ptr item = craftSlots->getItem(slot); if (item == NULL) continue; ArmorItem *armor = dynamic_cast(item->getItem()); @@ -40,9 +40,9 @@ bool ArmorDyeRecipe::matches(shared_ptr craftSlots, Level *le return target != NULL && !dyes.empty(); } -shared_ptr ArmorDyeRecipe::assembleDyedArmor(shared_ptr craftSlots) +std::shared_ptr ArmorDyeRecipe::assembleDyedArmor(std::shared_ptr craftSlots) { - shared_ptr target = nullptr; + std::shared_ptr target = nullptr; int colorTotals[3]; colorTotals[0] = 0; colorTotals[1] = 0; @@ -55,7 +55,7 @@ shared_ptr ArmorDyeRecipe::assembleDyedArmor(shared_ptrgetContainerSize(); slot++) { - shared_ptr item = craftSlots->getItem(slot); + std::shared_ptr item = craftSlots->getItem(slot); if (item == NULL) continue; armor = dynamic_cast(item->getItem()); @@ -128,7 +128,7 @@ shared_ptr ArmorDyeRecipe::assembleDyedArmor(shared_ptr ArmorDyeRecipe::assemble(shared_ptr craftSlots) +std::shared_ptr ArmorDyeRecipe::assemble(std::shared_ptr craftSlots) { return ArmorDyeRecipe::assembleDyedArmor(craftSlots); } @@ -181,8 +181,8 @@ void ArmorDyeRecipe::requires(INGREDIENTS_REQUIRED *pIngReq) { ItemInstance *expected = *ingredient; - if (expected!=NULL) - { + if (expected!=NULL) + { int iAuxVal = (*ingredient)->getAuxValue(); TempIngReq.uiGridA[iCount++]=expected->id | iAuxVal<<24; // 4J-PB - put the ingredients in boxes 1,2,4,5 so we can see them in a 2x2 crafting screen -- cgit v1.2.3