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

@@ -69,7 +69,7 @@ void VillagerGolem::serverAiMobStep()
if (--villageUpdateInterval <= 0)
{
villageUpdateInterval = 70 + random->nextInt(50);
shared_ptr<Village> _village = level->villages->getClosestVillage(Mth::floor(x), Mth::floor(y), Mth::floor(z), Villages::MaxDoorDist);
std::shared_ptr<Village> _village = level->villages->getClosestVillage(Mth::floor(x), Mth::floor(y), Mth::floor(z), Villages::MaxDoorDist);
village = _village;
if (_village == NULL) clearRestriction();
else
@@ -133,7 +133,7 @@ void VillagerGolem::readAdditionalSaveData(CompoundTag *tag)
setPlayerCreated(tag->getBoolean(L"PlayerCreated"));
}
bool VillagerGolem::doHurtTarget(shared_ptr<Entity> target)
bool VillagerGolem::doHurtTarget(std::shared_ptr<Entity> target)
{
attackAnimationTick = 10;
level->broadcastEntityEvent(shared_from_this(), EntityEvent::START_ATTACKING);
@@ -157,7 +157,7 @@ void VillagerGolem::handleEntityEvent(byte id)
else Golem::handleEntityEvent(id);
}
shared_ptr<Village> VillagerGolem::getVillage()
std::shared_ptr<Village> VillagerGolem::getVillage()
{
return village.lock();
}