a bit of formatting and artifacts cleanup

This commit is contained in:
thrust26 2020-02-26 23:06:15 +01:00
parent 906d0b169c
commit 37f2703244
2 changed files with 15 additions and 8 deletions

View File

@ -541,10 +541,14 @@ string HighScoresManager::fromPropString(const string& text) const
}
// some ugly formatting
if(result.length())
{
char first = result[0];
result = BSPF::toLowerCase(result);
result[0] = first;
return result;
}
// remove leading spaces (especially for empty values)
size_t start = result.find_first_not_of(" ");
return (start == std::string::npos) ? "" : result.substr(start);
}

View File

@ -807,11 +807,14 @@ void GameInfoDialog::loadHighScoresProperties(const Properties& props)
mySpecialAddress->setText(ss.str());
for (uInt32 a = 0; a < instance().highScores().numAddrBytes(info.numDigits, info.trailingZeroes); ++a)
for (uInt32 a = 0; a < HSM::MAX_SCORE_ADDR; ++a)
{
ss.str("");
if(a < instance().highScores().numAddrBytes(info.numDigits, info.trailingZeroes))
{
ss << hex << right //<< setw(HSM::MAX_ADDR_CHARS) << setfill(' ')
<< uppercase << info.scoreAddr[a];
}
myScoreAddress[a]->setText(ss.str());
}
updateHighScoresWidgets();