Remove AUTO_VAR macro and _toString function (#592)

This commit is contained in:
void_17
2026-03-06 02:11:18 +07:00
committed by GitHub
parent 7d6658fe5b
commit 55231bb8d3
294 changed files with 5067 additions and 5773 deletions

View File

@@ -337,16 +337,19 @@ int ChestTile::getDirectSignal(LevelSource *level, int x, int y, int z, int dir)
bool ChestTile::isCatSittingOnChest(Level *level, int x, int y, int z)
{
vector<shared_ptr<Entity> > *entities = level->getEntitiesOfClass(typeid(Ocelot), AABB::newTemp(x, y + 1, z, x + 1, y + 2, z + 1));
for(AUTO_VAR(it, entities->begin()); it != entities->end(); ++it)
if ( entities )
{
shared_ptr<Ocelot> ocelot = dynamic_pointer_cast<Ocelot>(*it);
if(ocelot->isSitting())
for (auto& it : *entities)
{
delete entities;
return true;
shared_ptr<Ocelot> ocelot = dynamic_pointer_cast<Ocelot>(it);
if ( ocelot && ocelot->isSitting())
{
delete entities;
return true;
}
}
delete entities;
}
delete entities;
return false;
}