Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.

Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
This commit is contained in:
Peter Nelson
2024-04-04 18:27:34 +01:00
committed by Peter Nelson
parent 3c94e81665
commit 9854553e10
16 changed files with 59 additions and 60 deletions

View File

@@ -12,9 +12,6 @@
#include "core/enum_type.hpp"
static uint const ZOOM_LVL_SHIFT = 2;
static uint const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT;
/** All zoom levels we know. */
enum ZoomLevel : uint8_t {
/* Our possible zoom-levels */
@@ -43,11 +40,13 @@ enum ZoomLevel : uint8_t {
ZOOM_LVL_MIN = ZOOM_LVL_NORMAL, ///< Minimum zoom level.
ZOOM_LVL_MAX = ZOOM_LVL_OUT_32X, ///< Maximum zoom level.
};
DECLARE_POSTFIX_INCREMENT(ZoomLevel)
DECLARE_ENUM_AS_ADDABLE(ZoomLevel)
static uint const ZOOM_BASE_SHIFT = static_cast<uint>(ZOOM_LVL_OUT_4X);
static uint const ZOOM_BASE = 1U << ZOOM_BASE_SHIFT;
extern int _gui_scale;
extern int _gui_scale_cfg;