Simplify inits/resets in entityclass/mapclass

Instead of using somewhat-obtuse for-loops to initialize or reset these
vectors, it takes up less lines of code and is clearer if we use
std::vector::resize() and std::vector::clear() instead.
This commit is contained in:
Misa
2020-05-19 16:41:29 -07:00
committed by Ethan Lee
parent de82918efd
commit e795fbb511
3 changed files with 22 additions and 51 deletions

View File

@@ -78,10 +78,8 @@ void entityclass::init()
void entityclass::resetallflags()
{
for (int i = 0; i < 100; i++)
{
flags[i] = false;
}
flags.clear();
flags.resize(100);
}
int entityclass::swncolour( int t )