Optimitzat el tema de comparacions i asignacions de strings buits. Mes que optimitzat, ara està mes mono
This commit is contained in:
@@ -129,7 +129,7 @@ void HiScoreTable::fillTexture()
|
||||
const auto score = format(options.game.hi_score_table[i].score);
|
||||
const auto score_lenght = score.size();
|
||||
const auto num_dots = 25 - name_lenght - score_lenght;
|
||||
std::string dots = "";
|
||||
std::string dots;
|
||||
for (int j = 0; j < (int)num_dots; ++j)
|
||||
{
|
||||
dots = dots + ".";
|
||||
@@ -255,7 +255,7 @@ std::string HiScoreTable::format(int number)
|
||||
const std::string score = std::to_string(number);
|
||||
|
||||
auto index = (int)score.size() - 1;
|
||||
std::string result = "";
|
||||
std::string result;
|
||||
auto i = 0;
|
||||
while (index >= 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user