diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-21 20:15:55 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:40:22 +0100 |
commit | 96a47877104d99e117b9fd97e43908f9e9567ec5 (patch) | |
tree | 2d7bec001304967a69796fd3975024662ffca330 /src/zoom_type.h | |
parent | aa220b2375efecf831ead0794e6de7b621e3c7a2 (diff) | |
download | openttd-96a47877104d99e117b9fd97e43908f9e9567ec5.tar.xz |
Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte
Diffstat (limited to 'src/zoom_type.h')
-rw-r--r-- | src/zoom_type.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/zoom_type.h b/src/zoom_type.h index ea8302761..47a725df2 100644 --- a/src/zoom_type.h +++ b/src/zoom_type.h @@ -14,11 +14,11 @@ #include "core/enum_type.hpp" -static int const ZOOM_LVL_SHIFT = 2; -static int const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT; +static uint const ZOOM_LVL_SHIFT = 2; +static uint const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT; /** All zoom levels we know. */ -enum ZoomLevel { +enum ZoomLevel : byte { /* Our possible zoom-levels */ ZOOM_LVL_BEGIN = 0, ///< Begin for iteration. ZOOM_LVL_NORMAL = 0, ///< The normal zoom level. @@ -46,14 +46,12 @@ enum ZoomLevel { ZOOM_LVL_MIN = ZOOM_LVL_NORMAL, ///< Minimum zoom level. ZOOM_LVL_MAX = ZOOM_LVL_OUT_32X, ///< Maximum zoom level. + }; DECLARE_POSTFIX_INCREMENT(ZoomLevel) -/** Type for storing the zoom level in a byte. */ -typedef SimpleTinyEnumT<ZoomLevel, byte> ZoomLevelByte; - -extern ZoomLevelByte _gui_zoom; -extern ZoomLevelByte _font_zoom; +extern ZoomLevel _gui_zoom; +extern ZoomLevel _font_zoom; #define ZOOM_LVL_GUI (_gui_zoom) #define ZOOM_LVL_FONT (_font_zoom) |