mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 03:56:43 +00:00
Codechange: use EnumRange over many enum loops
This commit is contained in:
committed by
Peter Nelson
parent
c991564e12
commit
c3b0d71973
+1
-3
@@ -380,9 +380,7 @@ static bool ResizeSprites(SpriteLoader::SpriteCollection &sprite, ZoomLevels spr
|
||||
if (!PadSprites(sprite, sprite_avail, encoder)) return false;
|
||||
|
||||
/* Create other missing zoom levels */
|
||||
for (ZoomLevel zoom = ZoomLevel::Begin; zoom != ZoomLevel::End; zoom++) {
|
||||
if (zoom == ZoomLevel::Min) continue;
|
||||
|
||||
for (ZoomLevel zoom : EnumRange(ZoomLevel::In2x, ZoomLevel::End)) {
|
||||
if (sprite_avail.Test(zoom)) {
|
||||
/* Check that size and offsets match the fully zoomed image. */
|
||||
[[maybe_unused]] const auto &root_sprite = sprite[ZoomLevel::Min];
|
||||
|
||||
Reference in New Issue
Block a user