forked from mirror/OpenTTD
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383)
This commit is contained in:
@@ -34,7 +34,7 @@ enum ResizeWidgetValues : uint8_t {
|
||||
/**
|
||||
* Window widget types, nested widget types, and nested widget part types.
|
||||
*/
|
||||
enum WidgetType {
|
||||
enum WidgetType : uint8_t {
|
||||
/* Window widget types. */
|
||||
WWT_EMPTY, ///< Empty widget, place holder to reserve space in widget tree.
|
||||
|
||||
@@ -108,7 +108,7 @@ enum WidgetType {
|
||||
};
|
||||
|
||||
/** Different forms of sizing nested widgets, using NWidgetBase::AssignSizePosition() */
|
||||
enum SizingType {
|
||||
enum SizingType : uint8_t {
|
||||
ST_SMALLEST, ///< Initialize nested widget tree to smallest size. Also updates \e current_x and \e current_y.
|
||||
ST_RESIZE, ///< Resize the nested widget tree.
|
||||
};
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widget flags that affect display and interaction with 'real' widgets. */
|
||||
enum NWidgetDisplay {
|
||||
enum NWidgetDisplay : uint16_t {
|
||||
/* Generic. */
|
||||
NDB_LOWERED = 0, ///< Widget is lowered (pressed down) bit.
|
||||
NDB_DISABLED = 1, ///< Widget is disabled (greyed out) bit.
|
||||
@@ -492,7 +492,7 @@ protected:
|
||||
};
|
||||
|
||||
/** Display planes with zero size for #NWidgetStacked. */
|
||||
enum StackedZeroSizePlanes {
|
||||
enum StackedZeroSizePlanes : int {
|
||||
SZSP_VERTICAL = INT_MAX / 2, ///< Display plane with zero size horizontally, and filling and resizing vertically.
|
||||
SZSP_HORIZONTAL, ///< Display plane with zero size vertically, and filling and resizing horizontally.
|
||||
SZSP_NONE, ///< Display plane with zero size in both directions (none filling and resizing).
|
||||
@@ -530,7 +530,7 @@ private:
|
||||
};
|
||||
|
||||
/** Nested widget container flags, */
|
||||
enum NWidContainerFlags {
|
||||
enum NWidContainerFlags : uint8_t {
|
||||
NCB_EQUALSIZE = 0, ///< Containers should keep all their (resizing) children equally large.
|
||||
NCB_BIGFIRST = 1, ///< Allocate space to biggest resize first.
|
||||
|
||||
@@ -719,7 +719,7 @@ private:
|
||||
|
||||
public:
|
||||
/** Stepping sizes when scrolling */
|
||||
enum ScrollbarStepping {
|
||||
enum ScrollbarStepping : uint8_t {
|
||||
SS_RAW, ///< Step in single units.
|
||||
SS_SMALL, ///< Step in #stepsize units.
|
||||
SS_BIG, ///< Step in #cap units.
|
||||
|
Reference in New Issue
Block a user