fix: resta tidy (60 troballes — empty-catch, widening, branch-clone, etc.)
This commit is contained in:
@@ -117,8 +117,6 @@ void Notifier::update(float delta_time) {
|
||||
}
|
||||
|
||||
case Status::FINISHED:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -172,7 +170,7 @@ void Notifier::show(std::vector<std::string> texts, const Style& style, int icon
|
||||
const int ICON_SPACE = icon >= 0 ? ICON_SIZE + PADDING_IN_H : 0;
|
||||
const TextAlign TEXT_IS = ICON_SPACE > 0 ? TextAlign::LEFT : style.text_align;
|
||||
const float WIDTH = Options::game.width - (PADDING_OUT * 2);
|
||||
const float HEIGHT = (TEXT_SIZE * texts.size()) + (PADDING_IN_V * 2);
|
||||
const float HEIGHT = (TEXT_SIZE * static_cast<float>(texts.size())) + (PADDING_IN_V * 2);
|
||||
const auto SHAPE = style.shape;
|
||||
|
||||
// Posición horizontal
|
||||
@@ -287,7 +285,7 @@ void Notifier::clearNotifications() {
|
||||
}
|
||||
|
||||
// Y absoluta de la base de la pila (justo debajo de Console, o 0 si no hay Console)
|
||||
auto Notifier::getStackBaseY() const -> int {
|
||||
auto Notifier::getStackBaseY() -> int {
|
||||
return Console::get() != nullptr ? Console::get()->getVisibleHeight() : 0;
|
||||
}
|
||||
|
||||
@@ -297,7 +295,7 @@ auto Notifier::getVisibleHeight() const -> int {
|
||||
for (const auto& n : notifications_) {
|
||||
if (n.state == Status::FINISHED) { continue; }
|
||||
const int N_BOTTOM = static_cast<int>(n.rect.y + n.rect.h);
|
||||
if (N_BOTTOM > bottom) { bottom = N_BOTTOM; }
|
||||
bottom = std::max(N_BOTTOM, bottom);
|
||||
}
|
||||
return bottom;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user