mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Invert entity invis check to reduce indentation level
Instead of doing if (!obj.entities[i].invis) { ... } It's better to do if (obj.entities[i].invis) { continue; } ... It reduces the indentation by one level, which is always a good thing.
This commit is contained in:
parent
3f46a0a2e9
commit
276daa11bb
1 changed files with 224 additions and 222 deletions
|
@ -1422,8 +1422,11 @@ void Graphics::drawentities()
|
||||||
|
|
||||||
for (int i = obj.entities.size() - 1; i >= 0; i--)
|
for (int i = obj.entities.size() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (!obj.entities[i].invis)
|
if (obj.entities[i].invis)
|
||||||
{
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (obj.entities[i].size == 0)
|
if (obj.entities[i].size == 0)
|
||||||
{
|
{
|
||||||
// Sprites
|
// Sprites
|
||||||
|
@ -1676,7 +1679,6 @@ void Graphics::drawentities()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue