fix: bucles cap a ranges algorithms (38 troballes)

This commit is contained in:
2026-05-14 21:36:21 +02:00
parent 0aa9f8fe0a
commit b4d3776239
14 changed files with 110 additions and 169 deletions

View File

@@ -36,9 +36,9 @@ Scoreboard::Scoreboard(std::shared_ptr<Data> data)
// Inicializa el vector de colores
const std::vector<std::string> COLORS = {"blue", "magenta", "green", "cyan", "yellow", "white", "bright_blue", "bright_magenta", "bright_green", "bright_cyan", "bright_yellow", "bright_white"};
for (const auto& color : COLORS) {
color_.push_back(stringToColor(color));
}
color_.reserve(COLORS.size());
std::ranges::transform(COLORS, std::back_inserter(color_),
[](const auto& color) { return stringToColor(color); });
}
// Pinta el objeto en pantalla