mirror of https://github.com/OpenTTD/OpenTTD
Add: Compiler check for _fios_colours/DetailFileType
parent
3ba27fc13c
commit
ee7df74fa1
|
@ -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.
|
||||
};
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue