passant linters a vore si trobe variables sense inicialitzar

This commit is contained in:
2025-08-17 00:23:59 +02:00
parent ada5025c65
commit 327987447d
55 changed files with 516 additions and 474 deletions

View File

@@ -65,7 +65,7 @@ auto loadFromFile() -> bool {
std::string line;
while (std::getline(file, line)) {
if (line.substr(0, 1) != "#") {
int pos = line.find("=");
int pos = line.find('=');
if (!set(line.substr(0, pos), line.substr(pos + 1, line.length()))) {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Unknown parameter: %s", line.substr(0, pos).c_str());
}
@@ -413,7 +413,7 @@ auto playerIdToString(Player::Id player_id) -> std::string {
}
// Convierte un texto a player id segun Lang
auto stringToPlayerId(std::string name) -> Player::Id {
auto stringToPlayerId(const std::string& name) -> Player::Id {
if (name == Lang::getText("[SERVICE_MENU] PLAYER1")) {
return Player::Id::PLAYER1;
}