1
0
Fork 0

Add: Compiler check for _fios_colours/DetailFileType

pull/12611/head
Sadie del Solar 2024-04-29 12:40:07 -07:00
parent 3ba27fc13c
commit ee7df74fa1
2 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,9 @@ enum DetailedFileType {
DFT_FIOS_DIR, ///< A directory entry.
DFT_FIOS_DIRECT, ///< Direct filename.
/* Ending variable used for compile time check of this array against _fios_colours in fiose_gui.cpp */
DFT_END,
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 (lengthof(_fios_colours) == DFT_END);
/**
* Sort the collected list save games prior to displaying it in the save/load gui.