diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/MerchantRecipe.cpp | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (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/MerchantRecipe.cpp')
| -rw-r--r-- | Minecraft.World/MerchantRecipe.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Minecraft.World/MerchantRecipe.cpp b/Minecraft.World/MerchantRecipe.cpp index b772b0c7..84fdc744 100644 --- a/Minecraft.World/MerchantRecipe.cpp +++ b/Minecraft.World/MerchantRecipe.cpp @@ -2,7 +2,7 @@ #include "MerchantRecipe.h" -void MerchantRecipe::_init(shared_ptr<ItemInstance> buyA, shared_ptr<ItemInstance> buyB, shared_ptr<ItemInstance> sell) +void MerchantRecipe::_init(std::shared_ptr<ItemInstance> buyA, std::shared_ptr<ItemInstance> buyB, std::shared_ptr<ItemInstance> sell) { this->buyA = buyA; this->buyB = buyB; @@ -20,34 +20,34 @@ MerchantRecipe::MerchantRecipe(CompoundTag *tag) load(tag); } -MerchantRecipe::MerchantRecipe(shared_ptr<ItemInstance> buyA, shared_ptr<ItemInstance> buyB, shared_ptr<ItemInstance> sell, int uses, int maxUses) +MerchantRecipe::MerchantRecipe(std::shared_ptr<ItemInstance> buyA, std::shared_ptr<ItemInstance> buyB, std::shared_ptr<ItemInstance> sell, int uses, int maxUses) { _init(buyA, buyB, sell); this->uses = uses; this->maxUses = maxUses; } -MerchantRecipe::MerchantRecipe(shared_ptr<ItemInstance> buy, shared_ptr<ItemInstance> sell) +MerchantRecipe::MerchantRecipe(std::shared_ptr<ItemInstance> buy, std::shared_ptr<ItemInstance> sell) { _init(buy, nullptr, sell); } -MerchantRecipe::MerchantRecipe(shared_ptr<ItemInstance> buy, Item *sell) +MerchantRecipe::MerchantRecipe(std::shared_ptr<ItemInstance> buy, Item *sell) { - _init(buy, nullptr, shared_ptr<ItemInstance>(new ItemInstance(sell))); + _init(buy, nullptr, std::shared_ptr<ItemInstance>(new ItemInstance(sell))); } -MerchantRecipe::MerchantRecipe(shared_ptr<ItemInstance> buy, Tile *sell) +MerchantRecipe::MerchantRecipe(std::shared_ptr<ItemInstance> buy, Tile *sell) { - _init(buy, nullptr, shared_ptr<ItemInstance>(new ItemInstance(sell))); + _init(buy, nullptr, std::shared_ptr<ItemInstance>(new ItemInstance(sell))); } -shared_ptr<ItemInstance> MerchantRecipe::getBuyAItem() +std::shared_ptr<ItemInstance> MerchantRecipe::getBuyAItem() { return buyA; } -shared_ptr<ItemInstance> MerchantRecipe::getBuyBItem() +std::shared_ptr<ItemInstance> MerchantRecipe::getBuyBItem() { return buyB; } @@ -57,7 +57,7 @@ bool MerchantRecipe::hasSecondaryBuyItem() return buyB != NULL; } -shared_ptr<ItemInstance> MerchantRecipe::getSellItem() +std::shared_ptr<ItemInstance> MerchantRecipe::getSellItem() { return sell; } |
