refactor: tornar std::ranges::{any,all,find}_of a bucles for explícits

This commit is contained in:
2026-05-26 13:45:54 +02:00
parent 0dcecf9a3c
commit 97d3749269
5 changed files with 43 additions and 22 deletions
+12 -4
View File
@@ -225,13 +225,21 @@ namespace Title {
}
auto ShipAnimator::isVisible() const -> bool {
return std::ranges::any_of(ships_,
[](const TitleShip& s) { return s.visible; });
for (const auto& s : ships_) {
if (s.visible) {
return true;
}
}
return false;
}
auto ShipAnimator::isAnimationComplete() const -> bool {
return std::ranges::all_of(ships_,
[](const TitleShip& s) { return !s.visible; });
for (const auto& s : ships_) {
if (s.visible) {
return false;
}
}
return true;
}
void ShipAnimator::updateEntering(TitleShip& ship, float delta_time) {