fix: resta tidy (60 troballes — empty-catch, widening, branch-clone, etc.)
This commit is contained in:
@@ -259,7 +259,8 @@ static auto cmdZoom(const std::vector<std::string>& args) -> std::string {
|
||||
if (N == Options::window.zoom) { return "Zoom already " + std::to_string(N); }
|
||||
Screen::get()->setWindowZoom(N);
|
||||
return "Zoom " + std::to_string(Options::window.zoom);
|
||||
} catch (...) {}
|
||||
} catch (...) { /* @INTENTIONAL: camp YAML malformat → conservem default */
|
||||
}
|
||||
return "usage: zoom [up|down|<1-" + std::to_string(Screen::getMaxZoom()) + ">]";
|
||||
}
|
||||
|
||||
@@ -912,7 +913,8 @@ static auto cmdPlayer(const std::vector<std::string>& args) -> std::string {
|
||||
int color = -1;
|
||||
try {
|
||||
color = std::stoi(args[1]);
|
||||
} catch (...) {}
|
||||
} catch (...) { /* @INTENTIONAL: camp YAML malformat → conservem default */
|
||||
}
|
||||
if (color < 0 || color > 15) { return "usage: player color <0-15>|default"; }
|
||||
if (!GameControl::change_player_color) { return "Game not initialized"; }
|
||||
GameControl::change_player_color(color);
|
||||
|
||||
Reference in New Issue
Block a user