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:
@@ -12,7 +12,7 @@ unsigned int ResultContainer::getContainerSize()
|
||||
return 1;
|
||||
}
|
||||
|
||||
shared_ptr<ItemInstance> ResultContainer::getItem(unsigned int slot)
|
||||
std::shared_ptr<ItemInstance> ResultContainer::getItem(unsigned int slot)
|
||||
{
|
||||
return (*items)[0];
|
||||
}
|
||||
@@ -22,29 +22,29 @@ int ResultContainer::getName()
|
||||
return 0;
|
||||
}
|
||||
|
||||
shared_ptr<ItemInstance> ResultContainer::removeItem(unsigned int slot, int count)
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItem(unsigned int slot, int count)
|
||||
{
|
||||
if ((*items)[0] != NULL)
|
||||
{
|
||||
shared_ptr<ItemInstance> item = (*items)[0];
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
shared_ptr<ItemInstance> ResultContainer::removeItemNoUpdate(int slot)
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItemNoUpdate(int slot)
|
||||
{
|
||||
if ((*items)[0] != NULL)
|
||||
{
|
||||
shared_ptr<ItemInstance> item = (*items)[0];
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ResultContainer::setItem(unsigned int slot, shared_ptr<ItemInstance> item)
|
||||
void ResultContainer::setItem(unsigned int slot, std::shared_ptr<ItemInstance> item)
|
||||
{
|
||||
(*items)[0] = item;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void ResultContainer::setChanged()
|
||||
{
|
||||
}
|
||||
|
||||
bool ResultContainer::stillValid(shared_ptr<Player> player)
|
||||
bool ResultContainer::stillValid(std::shared_ptr<Player> player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user