mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Compiler check for _fios_colours/DetailedFileType (#12781)
parent
0e7916a51b
commit
2bc3cc5b67
|
@ -40,6 +40,8 @@ enum DetailedFileType {
|
||||||
DFT_FIOS_DIR, ///< A directory entry.
|
DFT_FIOS_DIR, ///< A directory entry.
|
||||||
DFT_FIOS_DIRECT, ///< Direct filename.
|
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.
|
DFT_INVALID = 255, ///< Unknown or invalid file.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,8 @@ static const TextColour _fios_colours[] = {
|
||||||
TC_DARK_GREEN, // DFT_FIOS_DIR
|
TC_DARK_GREEN, // DFT_FIOS_DIR
|
||||||
TC_ORANGE, // DFT_FIOS_DIRECT
|
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.
|
* Sort the collected list save games prior to displaying it in the save/load gui.
|
||||||
|
|
Loading…
Reference in New Issue