From c9b99994b0bbd5160055314e753592f5e46f63fb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 16 Nov 2014 13:55:17 +0100 Subject: Add Q_DECL_RELAXED_CONSTEXPR to QUuid Change-Id: I0fa5806ef7a8e14b0728f0b914fa9ffd0dbad811 Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz --- src/corelib/plugin/quuid.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/corelib/plugin') diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index add245e4e3..ec5eb6b0e6 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -114,21 +114,20 @@ public: static QUuid fromRfc4122(const QByteArray &); bool isNull() const; - bool operator==(const QUuid &orig) const + Q_DECL_RELAXED_CONSTEXPR bool operator==(const QUuid &orig) const { - uint i; if (data1 != orig.data1 || data2 != orig.data2 || data3 != orig.data3) return false; - for(i = 0; i < 8; i++) + for (uint i = 0; i < 8; i++) if (data4[i] != orig.data4[i]) return false; return true; } - bool operator!=(const QUuid &orig) const + Q_DECL_RELAXED_CONSTEXPR bool operator!=(const QUuid &orig) const { return !(*this == orig); } @@ -155,24 +154,24 @@ public: } #endif - QUuid &operator=(const GUID &guid) + Q_DECL_RELAXED_CONSTEXPR QUuid &operator=(const GUID &guid) { *this = QUuid(guid); return *this; } - operator GUID() const + Q_DECL_RELAXED_CONSTEXPR operator GUID() const { GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } }; return guid; } - bool operator==(const GUID &guid) const + Q_DECL_RELAXED_CONSTEXPR bool operator==(const GUID &guid) const { return *this == QUuid(guid); } - bool operator!=(const GUID &guid) const + Q_DECL_RELAXED_CONSTEXPR bool operator!=(const GUID &guid) const { return !(*this == guid); } -- cgit v1.2.3