justificacio NOLINTs i neteja obsolet a Title::~Title
This commit is contained in:
@@ -61,7 +61,8 @@ class Room {
|
||||
|
||||
// Constructor y destructor
|
||||
Room(const std::string& room_path, std::shared_ptr<Scoreboard::Data> data);
|
||||
~Room(); // NOLINT(modernize-use-equals-default, performance-trivially-destructible)
|
||||
// NOLINTNEXTLINE(modernize-use-equals-default,performance-trivially-destructible) -- destructor definit al .cpp perquè la classe té unique_ptr a tipus forward-declared; no es pot fer = default ni eliminar a l'header sense incloure tots els headers transitivament.
|
||||
~Room();
|
||||
|
||||
// --- Funciones ---
|
||||
[[nodiscard]] auto getNumber() const -> const std::string& { return number_; }
|
||||
|
||||
@@ -47,7 +47,7 @@ Title::Title()
|
||||
}
|
||||
|
||||
// Destructor
|
||||
Title::~Title() { // NOLINT(modernize-use-equals-default)
|
||||
Title::~Title() {
|
||||
title_surface_->resetSubPalette();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,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: la guard de la línia 69 garanteix COUNT > 0, així que current_idx és sempre dins de rang.
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user