activa -Wextra -Wpedantic i neteja warnings

This commit is contained in:
2026-05-18 22:36:01 +02:00
parent 5349c60c39
commit 02bc4de6d5
17 changed files with 80 additions and 38 deletions
+2 -2
View File
@@ -39,11 +39,11 @@ class MenuOption {
[[nodiscard]] virtual auto getBehavior() const -> Behavior = 0;
[[nodiscard]] virtual auto getValueAsString() const -> std::string { return ""; }
virtual void adjustValue(bool adjust_up) {}
virtual void adjustValue(bool /*adjust_up*/) {}
[[nodiscard]] virtual auto getTargetGroup() const -> ServiceMenu::SettingsGroup { return ServiceMenu::SettingsGroup::MAIN; }
virtual void executeAction() {}
virtual auto getMaxValueWidth(Text* text_renderer) const -> int { return 0; } // Método virtual para que cada opción calcule el ancho de su valor más largo
virtual auto getMaxValueWidth(Text* /*text_renderer*/) const -> int { return 0; } // Método virtual para que cada opción calcule el ancho de su valor más largo
protected:
// --- Variables ---
+2 -2
View File
@@ -45,7 +45,7 @@ void MenuRenderer::ShowHideAnimation::stop() {
elapsed = 0.0F;
}
MenuRenderer::MenuRenderer(const ServiceMenu* menu_state, std::shared_ptr<Text> element_text, std::shared_ptr<Text> title_text)
MenuRenderer::MenuRenderer(const ServiceMenu* /*menu_state*/, std::shared_ptr<Text> element_text, std::shared_ptr<Text> title_text)
: element_text_(std::move(element_text)),
title_text_(std::move(title_text)) {
initializeMaxSizes();
@@ -145,7 +145,7 @@ void MenuRenderer::render(const ServiceMenu* menu_state) {
}
}
void MenuRenderer::update(const ServiceMenu* menu_state, float delta_time) {
void MenuRenderer::update(const ServiceMenu* /*menu_state*/, float delta_time) {
updateAnimations(delta_time);
if (visible_) {
+1 -1
View File
@@ -259,7 +259,7 @@ void Notifier::show(std::vector<std::string> texts, int icon, const std::string&
// Dibuja el icono de la notificación
if (has_icons_ && icon >= 0 && texts.size() >= 2) {
auto sp = std::make_unique<Sprite>(icon_texture_, (SDL_FRect){.x = 0, .y = 0, .w = ICON_SIZE, .h = ICON_SIZE});
auto sp = std::make_unique<Sprite>(icon_texture_, SDL_FRect{.x = 0, .y = 0, .w = ICON_SIZE, .h = ICON_SIZE});
sp->setPosition({.x = PADDING_IN_H, .y = PADDING_IN_V, .w = ICON_SIZE, .h = ICON_SIZE});
sp->setSpriteClip(SDL_FRect{
.x = static_cast<float>(ICON_SIZE * (icon % 10)),