mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 11:22:45 +01:00
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383)
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
static const int INT32_DIGITS_WITH_SIGN_AND_TERMINATION = 10 + 1 + 1;
|
||||
|
||||
/** Bitmask of flags for Script settings. */
|
||||
enum ScriptConfigFlags {
|
||||
enum ScriptConfigFlags : uint8_t {
|
||||
SCRIPTCONFIG_NONE = 0x0, ///< No flags set.
|
||||
// Unused flag 0x1.
|
||||
SCRIPTCONFIG_BOOLEAN = 0x2, ///< This value is a boolean (either 0 (false) or 1 (true) ).
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
* Where to get the config from, either default (depends on current game
|
||||
* mode) or force either newgame or normal
|
||||
*/
|
||||
enum ScriptSettingSource {
|
||||
enum ScriptSettingSource : uint8_t {
|
||||
SSS_DEFAULT, ///< Get the Script config from the current game mode
|
||||
SSS_FORCE_NEWGAME, ///< Get the newgame Script config
|
||||
SSS_FORCE_GAME, ///< Get the Script config from the current game
|
||||
|
||||
@@ -25,7 +25,7 @@ static const uint SQUIRREL_MAX_DEPTH = 25; ///< The maximum recursive depth for
|
||||
class ScriptInstance {
|
||||
private:
|
||||
/** The type of the data that follows in the savegame. */
|
||||
enum SQSaveLoadType {
|
||||
enum SQSaveLoadType : uint8_t {
|
||||
SQSL_INT = 0x00, ///< The following data is an integer.
|
||||
SQSL_STRING = 0x01, ///< The following data is an string.
|
||||
SQSL_ARRAY = 0x02, ///< The following data is an array.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <squirrel.h>
|
||||
|
||||
/** The type of script we're working with, i.e. for who is it? */
|
||||
enum class ScriptType {
|
||||
enum class ScriptType : uint8_t {
|
||||
AI, ///< The script is for AI scripts.
|
||||
GS, ///< The script is for Game scripts.
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user