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.
This commit is contained in:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -19,7 +19,7 @@ MerchantRecipeList::~MerchantRecipeList()
}
}
MerchantRecipe *MerchantRecipeList::getRecipeFor(shared_ptr<ItemInstance> buyA, shared_ptr<ItemInstance> buyB, int selectionHint)
MerchantRecipe *MerchantRecipeList::getRecipeFor(std::shared_ptr<ItemInstance> buyA, std::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(shared_ptr<ItemInstance> buy, shared_ptr<ItemInstance> buyB, shared_ptr<ItemInstance> sell)
MerchantRecipe *MerchantRecipeList::getMatchingRecipeFor(std::shared_ptr<ItemInstance> buy, std::shared_ptr<ItemInstance> buyB, std::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);
shared_ptr<ItemInstance> buyBItem = r->getBuyBItem();
std::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++)
{
shared_ptr<ItemInstance> buy = Packet::readItem(stream);
shared_ptr<ItemInstance> sell = Packet::readItem(stream);
std::shared_ptr<ItemInstance> buy = Packet::readItem(stream);
std::shared_ptr<ItemInstance> sell = Packet::readItem(stream);
shared_ptr<ItemInstance> buyB = nullptr;
std::shared_ptr<ItemInstance> buyB = nullptr;
if (stream->readBoolean())
{
buyB = Packet::readItem(stream);