mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-23 19:46:34 +00:00
Codechange: use EnumRange over many enum loops
This commit is contained in:
committed by
Peter Nelson
parent
c991564e12
commit
c3b0d71973
+1
-1
@@ -547,7 +547,7 @@ bool IsValidConsoleColour(ExtendedTextColour c)
|
||||
|
||||
/* A text colour from the palette is used; must be the company
|
||||
* colour gradient, so it must be one of those. */
|
||||
for (Colours i = Colours::Begin; i < Colours::End; i++) {
|
||||
for (Colours i : EnumRange(Colours::End)) {
|
||||
if (ExtendedTextColour{GetColourGradient(i, Shade::Normal)} == c) return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user