elimina NOLINTs petits obsolets; justifica el residual de CallAndMessage

This commit is contained in:
2026-05-17 18:30:37 +02:00
parent 3228647738
commit 418df568a1
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -143,8 +143,10 @@ static auto applyPreset(const std::vector<std::string>& 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<size_t>(current_idx)].name // NOLINT(clang-analyzer-core.CallAndMessage)
: presets_postfx[static_cast<size_t>(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<size_t>(current_idx)].name
: presets_postfx[static_cast<size_t>(current_idx)].name;
// NOLINTEND(clang-analyzer-core.CallAndMessage)
return prettyName(name);
};