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

@@ -22,10 +22,10 @@ void HurtByTargetGoal::start()
if (alertSameType)
{
vector<shared_ptr<Entity> > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within));
vector<std::shared_ptr<Entity> > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within));
for(AUTO_VAR(it, nearby->begin()); it != nearby->end(); ++it)
{
shared_ptr<Mob> other = dynamic_pointer_cast<Mob>(*it);
std::shared_ptr<Mob> other = dynamic_pointer_cast<Mob>(*it);
if (this->mob->shared_from_this() == other) continue;
if (other->getTarget() != NULL) continue;
other->setTarget(mob->getLastHurtByMob());