1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Don't use std::count() in Game::trinkets()

The less STL, the better.
This commit is contained in:
Misa 2020-04-09 16:17:11 -07:00 committed by Ethan Lee
parent 45e7a9db3e
commit 3774ec390c

View file

@ -7641,7 +7641,15 @@ void Game::resetgameclock()
int Game::trinkets() int Game::trinkets()
{ {
return std::count(obj.collect.begin(), obj.collect.end(), true); int temp = 0;
for (size_t i = 0; i < obj.collect.size(); i++)
{
if (obj.collect[i])
{
temp++;
}
}
return temp;
} }
int Game::crewmates() int Game::crewmates()