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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user