diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-04-03 21:08:13 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-04-03 19:43:59 +0000 |
commit | 650de56c7fa2fd91b4c76e309fdd7b7eacd57ff5 (patch) | |
tree | 39b3ba6179840f3978c6c5c12512c96ba33a4232 /src/corelib/plugin | |
parent | a72b3ab73c31f3316f8f2b0f2e17edd41a459481 (diff) |
QUuid: implement op> in terms of op<
More maintainable, and less code.
Change-Id: Ia99e5deefe4c510fe870076a03ec243ba631a7a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r-- | src/corelib/plugin/quuid.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index 8b940aa2dc..193657ce61 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -840,19 +840,9 @@ bool QUuid::operator<(const QUuid &other) const \sa variant() */ -#define ISMORE(f1, f2) if (f1!=f2) return (f1>f2); bool QUuid::operator>(const QUuid &other) const { - if (variant() != other.variant()) - return variant() > other.variant(); - - ISMORE(data1, other.data1); - ISMORE(data2, other.data2); - ISMORE(data3, other.data3); - for (int n = 0; n < 8; n++) { - ISMORE(data4[n], other.data4[n]); - } - return false; + return other < *this; } /*! |