aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/MerchantRecipeList.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
commit119bff351450ea16ffda550b6e0f67379b29f708 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/MerchantRecipeList.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/MerchantRecipeList.cpp')
-rw-r--r--Minecraft.World/MerchantRecipeList.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/MerchantRecipeList.cpp b/Minecraft.World/MerchantRecipeList.cpp
index 26436b59..bd7a126c 100644
--- a/Minecraft.World/MerchantRecipeList.cpp
+++ b/Minecraft.World/MerchantRecipeList.cpp
@@ -19,7 +19,7 @@ MerchantRecipeList::~MerchantRecipeList()
}
}
-MerchantRecipe *MerchantRecipeList::getRecipeFor(std::shared_ptr<ItemInstance> buyA, std::shared_ptr<ItemInstance> buyB, int selectionHint)
+MerchantRecipe *MerchantRecipeList::getRecipeFor(shared_ptr<ItemInstance> buyA, shared_ptr<ItemInstance> buyB, int selectionHint)
{
if (selectionHint > 0 && selectionHint < m_recipes.size())
{
@@ -67,7 +67,7 @@ bool MerchantRecipeList::addIfNewOrBetter(MerchantRecipe *recipe)
return true;
}
-MerchantRecipe *MerchantRecipeList::getMatchingRecipeFor(std::shared_ptr<ItemInstance> buy, std::shared_ptr<ItemInstance> buyB, std::shared_ptr<ItemInstance> sell)
+MerchantRecipe *MerchantRecipeList::getMatchingRecipeFor(shared_ptr<ItemInstance> buy, shared_ptr<ItemInstance> buyB, shared_ptr<ItemInstance> sell)
{
for (int i = 0; i < m_recipes.size(); i++)
{
@@ -92,7 +92,7 @@ void MerchantRecipeList::writeToStream(DataOutputStream *stream)
Packet::writeItem(r->getBuyAItem(), stream);
Packet::writeItem(r->getSellItem(), stream);
- std::shared_ptr<ItemInstance> buyBItem = r->getBuyBItem();
+ shared_ptr<ItemInstance> buyBItem = r->getBuyBItem();
stream->writeBoolean(buyBItem != NULL);
if (buyBItem != NULL)
{
@@ -111,10 +111,10 @@ MerchantRecipeList *MerchantRecipeList::createFromStream(DataInputStream *stream
int count = (int) (stream->readByte() & 0xff);
for (int i = 0; i < count; i++)
{
- std::shared_ptr<ItemInstance> buy = Packet::readItem(stream);
- std::shared_ptr<ItemInstance> sell = Packet::readItem(stream);
+ shared_ptr<ItemInstance> buy = Packet::readItem(stream);
+ shared_ptr<ItemInstance> sell = Packet::readItem(stream);
- std::shared_ptr<ItemInstance> buyB = nullptr;
+ shared_ptr<ItemInstance> buyB = nullptr;
if (stream->readBoolean())
{
buyB = Packet::readItem(stream);