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

@@ -13,9 +13,9 @@ AgableMob::AgableMob(Level *level) : PathfinderMob(level)
registeredBBHeight = 0;
}
bool AgableMob::interact(shared_ptr<Player> player)
bool AgableMob::interact(std::shared_ptr<Player> player)
{
shared_ptr<ItemInstance> item = player->inventory->getSelected();
std::shared_ptr<ItemInstance> item = player->inventory->getSelected();
if (item != NULL && item->id == Item::monsterPlacer_Id)
{
@@ -24,7 +24,7 @@ bool AgableMob::interact(shared_ptr<Player> player)
eINSTANCEOF classToSpawn = EntityIO::getClass(item->getAuxValue());
if (classToSpawn != eTYPE_NOTSET && (classToSpawn & eTYPE_AGABLE_MOB) == eTYPE_AGABLE_MOB && classToSpawn == GetType() ) // 4J Added GetType() check to only spawn same type
{
shared_ptr<AgableMob> offspring = getBreedOffspring(dynamic_pointer_cast<AgableMob>(shared_from_this()));
std::shared_ptr<AgableMob> offspring = getBreedOffspring(dynamic_pointer_cast<AgableMob>(shared_from_this()));
if (offspring != NULL)
{
offspring->setAge(-20 * 60 * 20);