mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Make obj.customcollect a vector of bools
It's already treated as a vector of bools, so might as well formally declare it as that.
This commit is contained in:
@@ -5264,7 +5264,7 @@ void Game::customloadquick(std::string savfile)
|
||||
obj.customcollect.clear();
|
||||
for(size_t i = 0; i < values.size(); i++)
|
||||
{
|
||||
obj.customcollect.push_back(atoi(values[i].c_str()));
|
||||
obj.customcollect.push_back((bool) atoi(values[i].c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6065,7 +6065,7 @@ void Game::customsavequick(std::string savfile)
|
||||
std::string customcollect;
|
||||
for(size_t i = 0; i < obj.customcollect.size(); i++ )
|
||||
{
|
||||
customcollect += help.String(obj.customcollect[i]) + ",";
|
||||
customcollect += help.String((int) obj.customcollect[i]) + ",";
|
||||
}
|
||||
msg = new TiXmlElement( "customcollect" );
|
||||
msg->LinkEndChild( new TiXmlText( customcollect.c_str() ));
|
||||
@@ -7638,5 +7638,5 @@ int Game::trinkets()
|
||||
|
||||
int Game::crewmates()
|
||||
{
|
||||
return std::count(obj.customcollect.begin(), obj.customcollect.end(), 1);
|
||||
return std::count(obj.customcollect.begin(), obj.customcollect.end(), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user