summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-04-03 21:08:13 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-04-03 19:43:59 +0000
commit650de56c7fa2fd91b4c76e309fdd7b7eacd57ff5 (patch)
tree39b3ba6179840f3978c6c5c12512c96ba33a4232
parenta72b3ab73c31f3316f8f2b0f2e17edd41a459481 (diff)
QUuid: implement op> in terms of op<
More maintainable, and less code. Change-Id: Ia99e5deefe4c510fe870076a03ec243ba631a7a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/plugin/quuid.cpp12
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;
}
/*!