Codechange: use EnumRange over many enum loops

This commit is contained in:
Peter Nelson
2026-06-13 21:54:42 +01:00
committed by Peter Nelson
parent c991564e12
commit c3b0d71973
67 changed files with 136 additions and 141 deletions
+2 -2
View File
@@ -387,8 +387,8 @@ bool HandleBootstrap()
* This way the mauve and gray colours work and we can show the user interface. */
GfxInitPalettes();
static const EnumIndexArray<uint8_t, Colours, Colours::End> offsets = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0, 0, 0x04, 0x08 };
for (Colours i = Colours::Begin; i != Colours::End; i++) {
for (Shade j = Shade::Begin; j < Shade::End; j++) {
for (Colours i : EnumRange(Colours::End)) {
for (Shade j : EnumRange(Shade::End)) {
SetColourGradient(i, j, PixelColour(offsets[i] + to_underlying(j)));
}
}