diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-21 09:41:23 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-06 16:59:04 +0000 |
commit | 9f66b1dd71f5802d99a3478aaf13c87af136a3b6 (patch) | |
tree | 4f456950c7132cc9c95a21a57b9f70f7f686d75f /src/gui | |
parent | 73b7096822a9f83e050c148dd153b1a42da176d6 (diff) |
Set private inline QRgba64 methods always inline
By setting them always inline we ensure they will never generate symbols.
Change-Id: I2c815c4fe2cb498187656e0b25ef4499258885ff
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qrgba64.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index 264ec394cd..fab9506ff2 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -161,12 +161,12 @@ public: } private: - static Q_DECL_CONSTEXPR quint64 alphaMask() { return Q_UINT64_C(0xffff) << AlphaShift; } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE quint64 alphaMask() { return Q_UINT64_C(0xffff) << AlphaShift; } - static Q_DECL_CONSTEXPR uint div_257_floor(uint x) { return (x - (x >> 8)) >> 8; } - static Q_DECL_CONSTEXPR uint div_257(uint x) { return div_257_floor(x + 128); } - static Q_DECL_CONSTEXPR uint div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; } - Q_DECL_RELAXED_CONSTEXPR QRgba64 unpremultiplied_32bit() const + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_257_floor(uint x) { return (x - (x >> 8)) >> 8; } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_257(uint x) { return div_257_floor(x + 128); } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; } + Q_DECL_RELAXED_CONSTEXPR Q_ALWAYS_INLINE QRgba64 unpremultiplied_32bit() const { if (isOpaque() || isTransparent()) return *this; @@ -176,7 +176,7 @@ private: const quint16 b = (quint32(blue()) * 0xffff + a/2) / a; return fromRgba64(r, g, b, a); } - Q_DECL_RELAXED_CONSTEXPR QRgba64 unpremultiplied_64bit() const + Q_DECL_RELAXED_CONSTEXPR Q_ALWAYS_INLINE QRgba64 unpremultiplied_64bit() const { if (isOpaque() || isTransparent()) return *this; |