diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-05-27 15:00:26 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-06-13 15:05:32 +0200 |
commit | 4059af81d33bb1f6a7773b77d3039f2fc53fcd23 (patch) | |
tree | c0308c515ef615133d58fd821847d0707706e40a /src/gui/painting | |
parent | e650ea323f5d7146caa020b69d22ace437609883 (diff) |
Stop using mixed enum arithmetic
It's deprecated. Port some unnamed enumerations (used only to
declare constants) to constexpr integers instead. Apply qToUnderlying
as needed.
Task-number: QTBUG-94059
Change-Id: Ifaa64ece966ce08df40dc71ffcfa7ac038110e0b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index eb01487743..06eb08ea9c 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -71,10 +71,8 @@ Q_LOGGING_CATEGORY(lcQtGuiDrawHelper, "qt.gui.drawhelper") constants and structures */ -enum { - fixed_scale = 1 << 16, - half_point = 1 << 15 -}; +constexpr int fixed_scale = 1 << 16; +constexpr int half_point = 1 << 15; template <QPixelLayout::BPP bpp> static inline uint QT_FASTCALL fetch1Pixel(const uchar *, int) |