clang-tidy

This commit is contained in:
2025-08-17 10:20:41 +02:00
parent b359a73d50
commit 8ddc5d94f1
73 changed files with 867 additions and 833 deletions

View File

@@ -43,7 +43,7 @@ void WindowMessage::render() {
std::string visible_title = getTruncatedText(title_, available_width);
if (!visible_title.empty()) {
text_renderer_->writeStyle(
rect_.x + rect_.w / 2.0F,
rect_.x + (rect_.w / 2.0F),
current_y,
visible_title,
title_style_);
@@ -55,9 +55,9 @@ void WindowMessage::render() {
SDL_SetRenderDrawColor(renderer, config_.border_color.r, config_.border_color.g, config_.border_color.b, config_.border_color.a);
SDL_RenderLine(renderer,
rect_.x + config_.padding,
current_y - config_.title_separator_spacing / 2.0F,
current_y - (config_.title_separator_spacing / 2.0F),
rect_.x + rect_.w - config_.padding,
current_y - config_.title_separator_spacing / 2.0F);
current_y - (config_.title_separator_spacing / 2.0F));
}
}
@@ -66,7 +66,7 @@ void WindowMessage::render() {
std::string visible_text = getTruncatedText(text, available_width);
if (!visible_text.empty()) {
text_renderer_->writeStyle(
rect_.x + rect_.w / 2.0F,
rect_.x + (rect_.w / 2.0F),
current_y,
visible_text,
text_style_);
@@ -147,7 +147,7 @@ void WindowMessage::clearTexts() {
}
void WindowMessage::setPosition(float x, float y, PositionMode mode) {
anchor_ = {x, y};
anchor_ = {.x = x, .y = y};
position_mode_ = mode;
updatePosition();
}
@@ -373,7 +373,7 @@ auto WindowMessage::shouldShowContent() const -> bool {
auto WindowMessage::easeOut(float t) -> float {
// Función de suavizado ease-out cuadrática
return 1.0F - (1.0F - t) * (1.0F - t);
return 1.0F - ((1.0F - t) * (1.0F - t));
}
auto WindowMessage::getAvailableTextWidth() const -> float {