summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qpixelformat.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-08-03 02:14:37 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-08-09 09:04:51 +0200
commit184fd8aa6c61d642b99391487e11985478a2cb5b (patch)
treef4c70afbf6cbdb97e2adcc61cd0dd37fdf9509b8 /src/gui/kernel/qpixelformat.h
parentd131abde59190ed5ea8673828bce13fff66c1e3a (diff)
QPixelFormat is better taken by-value
Being a better quint64, it can be passed in registers, so take them as value args. Change-Id: I8eb96a2594d910b538b651fb3ca567c0c124dd3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'src/gui/kernel/qpixelformat.h')
-rw-r--r--src/gui/kernel/qpixelformat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h
index 5bf64ac043..2b8d23736d 100644
--- a/src/gui/kernel/qpixelformat.h
+++ b/src/gui/kernel/qpixelformat.h
@@ -221,10 +221,10 @@ private:
private:
quint64 data;
- friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
+ friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(QPixelFormat fmt1, QPixelFormat fmt2)
{ return fmt1.data == fmt2.data; }
- friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
+ friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(QPixelFormat fmt1, QPixelFormat fmt2)
{ return !(fmt1 == fmt2); }
};
Q_STATIC_ASSERT(sizeof(QPixelFormat) == sizeof(quint64));