diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-27 11:22:01 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-28 08:39:42 +0200 |
commit | f26147b49396345e4b0afdc48c8ee16d8ddc5fd1 (patch) | |
tree | c735c9655feea08bb8d99794c51d44ff2fb578a0 /src/gui/painting/qpixellayout_p.h | |
parent | 59e3073b1cb944128b7533dd85be13074ab07b72 (diff) |
Replace Q_ALWAYS_INLINE with static inline
Static inline on functions serves the same purpose of keeping non-
inlined instances from different binaries from being mixed, and has the
benefit of being available across compilers.
Change-Id: I12467f6d887471d8fd70ff4623c473c2a5a45664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qpixellayout_p.h')
-rw-r--r-- | src/gui/painting/qpixellayout_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpixellayout_p.h b/src/gui/painting/qpixellayout_p.h index 0cbf514ded..99d98ac36e 100644 --- a/src/gui/painting/qpixellayout_p.h +++ b/src/gui/painting/qpixellayout_p.h @@ -225,26 +225,26 @@ inline uint qRgbSwapRgb30(uint c) } #if Q_BYTE_ORDER == Q_BIG_ENDIAN -Q_ALWAYS_INLINE quint32 RGBA2ARGB(quint32 x) { +static inline quint32 RGBA2ARGB(quint32 x) { quint32 rgb = x >> 8; quint32 a = x << 24; return a | rgb; } -Q_ALWAYS_INLINE quint32 ARGB2RGBA(quint32 x) { +static inline quint32 ARGB2RGBA(quint32 x) { quint32 rgb = x << 8; quint32 a = x >> 24; return a | rgb; } #else -Q_ALWAYS_INLINE quint32 RGBA2ARGB(quint32 x) { +static inline quint32 RGBA2ARGB(quint32 x) { // RGBA8888 is ABGR32 on little endian. quint32 ag = x & 0xff00ff00; quint32 rg = x & 0x00ff00ff; return ag | (rg << 16) | (rg >> 16); } -Q_ALWAYS_INLINE quint32 ARGB2RGBA(quint32 x) { +static inline quint32 ARGB2RGBA(quint32 x) { return RGBA2ARGB(x); } #endif |