diff --git a/source/game/gameplay/room_loader.cpp b/source/game/gameplay/room_loader.cpp index 7dc5890..7e757f2 100644 --- a/source/game/gameplay/room_loader.cpp +++ b/source/game/gameplay/room_loader.cpp @@ -39,7 +39,7 @@ auto RoomLoader::convertAutoSurface(const fkyaml::node& node) -> int { } // Convierte un tilemap 2D a vector 1D flat -auto RoomLoader::flattenTilemap(const std::vector>& tilemap_2d) -> std::vector { // NOLINT(readability-named-parameter) +auto RoomLoader::flattenTilemap(const std::vector>& tilemap_2d) -> std::vector { std::vector tilemap_flat; tilemap_flat.reserve(512); // 16 rows × 32 cols diff --git a/source/game/scenes/title.cpp b/source/game/scenes/title.cpp index 969ae3a..d59344e 100644 --- a/source/game/scenes/title.cpp +++ b/source/game/scenes/title.cpp @@ -51,7 +51,7 @@ Title::Title() } // Destructor -Title::~Title() { // NOLINT(modernize-use-equals-default) +Title::~Title() { loading_screen_surface_->resetSubPalette(); title_surface_->resetSubPalette(); } diff --git a/source/game/ui/console_commands.cpp b/source/game/ui/console_commands.cpp index 44f30a0..ade3c39 100644 --- a/source/game/ui/console_commands.cpp +++ b/source/game/ui/console_commands.cpp @@ -143,8 +143,10 @@ static auto applyPreset(const std::vector& args) -> std::string { if (COUNT == 0) { return "No " + SHADER_LABEL + " presets available"; } const auto PRESET_NAME = [&]() -> std::string { - const auto& name = IS_CRTPI ? presets_crtpi[static_cast(current_idx)].name // NOLINT(clang-analyzer-core.CallAndMessage) - : presets_postfx[static_cast(current_idx)].name; // NOLINT(clang-analyzer-core.CallAndMessage) + // NOLINTBEGIN(clang-analyzer-core.CallAndMessage): fals positiu — l'analitzador no veu que el guard `if (COUNT == 0) return ...` (línia 143) garanteix que el vector no està buit, així que current_idx és un índex vàlid + const auto& name = IS_CRTPI ? presets_crtpi[static_cast(current_idx)].name + : presets_postfx[static_cast(current_idx)].name; + // NOLINTEND(clang-analyzer-core.CallAndMessage) return prettyName(name); };