summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpixellayout_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-12 14:14:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-14 15:52:58 +0200
commit6f0df02d002356625f10683ef84da7685d92a2c4 (patch)
tree46713209af459ebda534c3404f48c5f5c80ba3f8 /src/gui/painting/qpixellayout_p.h
parent44cce1a2ea9dadd8b2de93f40de34269dda703c0 (diff)
Replace Qt CONSTEXPR defines with constexpr
Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/gui/painting/qpixellayout_p.h')
-rw-r--r--src/gui/painting/qpixellayout_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpixellayout_p.h b/src/gui/painting/qpixellayout_p.h
index 99d98ac36e..6d20131efe 100644
--- a/src/gui/painting/qpixellayout_p.h
+++ b/src/gui/painting/qpixellayout_p.h
@@ -77,7 +77,7 @@ inline QRgb qRepremultiply(QRgb p)
if (alpha == 255 || alpha == 0)
return p;
p = qUnpremultiply(p);
- Q_CONSTEXPR uint mult = 255 / (255 >> Shift);
+ constexpr uint mult = 255 / (255 >> Shift);
const uint newAlpha = mult * (alpha >> Shift);
p = (p & ~0xff000000) | (newAlpha<<24);
return qPremultiply(p);
@@ -90,7 +90,7 @@ inline QRgba64 qRepremultiply(QRgba64 p)
if (alpha == 65535 || alpha == 0)
return p;
p = p.unpremultiplied();
- Q_CONSTEXPR uint mult = 65535 / (65535 >> Shift);
+ constexpr uint mult = 65535 / (65535 >> Shift);
p.setAlpha(mult * (alpha >> Shift));
return p.premultiplied();
}