1
0
Fork 0

Codechange: Compiler check for _fios_colours/DetailedFileType

pull/12781/head
Sadie del Solar 2024-04-29 12:40:07 -07:00
parent 68f7d585b4
commit 60ba3056ab
2 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,8 @@ enum DetailedFileType {
DFT_FIOS_DIR, ///< A directory entry.
DFT_FIOS_DIRECT, ///< Direct filename.
DFT_END, ///< End of this enum. Supports a compile time size check against _fios_colours in fios_gui.cpp
DFT_INVALID = 255, ///< Unknown or invalid file.
};

View File

@ -238,7 +238,8 @@ static const TextColour _fios_colours[] = {
TC_DARK_GREEN, // DFT_FIOS_DIR
TC_ORANGE, // DFT_FIOS_DIRECT
};
/* This should align with the DetailedFileType enum defined in fileio_type.h */
static_assert(std::size(_fios_colours) == DFT_END);
/**
* Sort the collected list save games prior to displaying it in the save/load gui.