mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Game::loadcustomlevelstats: move some declarations to later in function
The declarations of `std::vector<std::string> customlevelnames` and `std::vector<int> customlevelscores` are made quite early in the function, commented with "Old system", but the place where the old system is processed is after a big chunk of code that processes the new system (and indeed never uses these vectors). So for readability, they're now closer to where they're used.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
58c006f61f
commit
82240d262b
@@ -504,10 +504,6 @@ void Game::loadcustomlevelstats(void)
|
||||
|
||||
customlevelstats.clear();
|
||||
|
||||
// Old system
|
||||
std::vector<std::string> customlevelnames;
|
||||
std::vector<int> customlevelscores;
|
||||
|
||||
tinyxml2::XMLElement* pElem;
|
||||
tinyxml2::XMLElement* firstElement;
|
||||
|
||||
@@ -553,6 +549,9 @@ void Game::loadcustomlevelstats(void)
|
||||
|
||||
|
||||
// Since we're still here, we must be on the old system
|
||||
std::vector<std::string> customlevelnames;
|
||||
std::vector<int> customlevelscores;
|
||||
|
||||
for (pElem = firstElement; pElem; pElem=pElem->NextSiblingElement())
|
||||
{
|
||||
const char* pKey = pElem->Value();
|
||||
|
||||
Reference in New Issue
Block a user