mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
58c006f61f
commit
82240d262b
1 changed files with 3 additions and 4 deletions
|
@ -504,10 +504,6 @@ void Game::loadcustomlevelstats(void)
|
||||||
|
|
||||||
customlevelstats.clear();
|
customlevelstats.clear();
|
||||||
|
|
||||||
// Old system
|
|
||||||
std::vector<std::string> customlevelnames;
|
|
||||||
std::vector<int> customlevelscores;
|
|
||||||
|
|
||||||
tinyxml2::XMLElement* pElem;
|
tinyxml2::XMLElement* pElem;
|
||||||
tinyxml2::XMLElement* firstElement;
|
tinyxml2::XMLElement* firstElement;
|
||||||
|
|
||||||
|
@ -553,6 +549,9 @@ void Game::loadcustomlevelstats(void)
|
||||||
|
|
||||||
|
|
||||||
// Since we're still here, we must be on the old system
|
// 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())
|
for (pElem = firstElement; pElem; pElem=pElem->NextSiblingElement())
|
||||||
{
|
{
|
||||||
const char* pKey = pElem->Value();
|
const char* pKey = pElem->Value();
|
||||||
|
|
Loading…
Reference in a new issue