mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-22 02:03:50 +00:00
Remove AUTO_VAR macro and _toString function (#592)
This commit is contained in:
parent
7d6658fe5b
commit
55231bb8d3
294 changed files with 5067 additions and 5773 deletions
|
|
@ -87,10 +87,8 @@ shared_ptr<DoorInfo> MoveThroughVillageGoal::getNextDoorInfo(shared_ptr<Village>
|
|||
shared_ptr<DoorInfo> closest = nullptr;
|
||||
int closestDistSqr = Integer::MAX_VALUE;
|
||||
vector<shared_ptr<DoorInfo> > *doorInfos = village->getDoorInfos();
|
||||
//for (DoorInfo di : doorInfos)
|
||||
for(AUTO_VAR(it, doorInfos->begin()); it != doorInfos->end(); ++it)
|
||||
for(auto& di : *doorInfos)
|
||||
{
|
||||
shared_ptr<DoorInfo> di = *it;
|
||||
int distSqr = di->distanceToSqr(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z));
|
||||
if (distSqr < closestDistSqr)
|
||||
{
|
||||
|
|
@ -104,11 +102,10 @@ shared_ptr<DoorInfo> MoveThroughVillageGoal::getNextDoorInfo(shared_ptr<Village>
|
|||
|
||||
bool MoveThroughVillageGoal::hasVisited(shared_ptr<DoorInfo>di)
|
||||
{
|
||||
//for (DoorInfo di2 : visited)
|
||||
for(AUTO_VAR(it, visited.begin()); it != visited.end(); )
|
||||
{
|
||||
for (auto it = visited.begin(); it != visited.end();)
|
||||
{
|
||||
shared_ptr<DoorInfo> di2 = (*it).lock();
|
||||
if( di2 == NULL )
|
||||
if( di2 )
|
||||
{
|
||||
it = visited.erase(it);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue