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:
Dav999 2023-10-25 02:57:50 +02:00 committed by Misa Elizabeth Kai
parent 58c006f61f
commit 82240d262b
1 changed files with 3 additions and 4 deletions

View File

@ -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();