mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 12:44:10 +01:00
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383)
This commit is contained in:
@@ -94,7 +94,7 @@ public:
|
||||
return Date{(365 * year_as_int) + number_of_leap_years};
|
||||
}
|
||||
|
||||
enum Trigger {
|
||||
enum Trigger : uint8_t {
|
||||
DAY,
|
||||
WEEK,
|
||||
MONTH,
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
YEAR,
|
||||
};
|
||||
|
||||
enum Priority {
|
||||
enum Priority : uint8_t {
|
||||
NONE, ///< These timers can be executed in any order; there is no Random() in them, so order is not relevant.
|
||||
|
||||
/* All other may have a Random() call in them, so order is important.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
class TimerGameRealtime {
|
||||
public:
|
||||
enum PeriodFlags {
|
||||
enum PeriodFlags : uint8_t {
|
||||
ALWAYS, ///< Always run, even when paused.
|
||||
UNPAUSED, ///< Only run when not paused.
|
||||
AUTOSAVE, ///< Only run when not paused or there was a Command executed recently.
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
using Ticks = int32_t; ///< The type to store ticks in
|
||||
using TickCounter = uint64_t; ///< The type that the tick counter is stored in
|
||||
|
||||
enum Priority {
|
||||
enum Priority : uint8_t {
|
||||
NONE, ///< These timers can be executed in any order; the order is not relevant.
|
||||
|
||||
/* For all other priorities, the order is important.
|
||||
|
||||
Reference in New Issue
Block a user