From 650de56c7fa2fd91b4c76e309fdd7b7eacd57ff5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 3 Apr 2015 21:08:13 +0200 Subject: [PATCH] QUuid: implement op> in terms of op< More maintainable, and less code. Change-Id: Ia99e5deefe4c510fe870076a03ec243ba631a7a3 Reviewed-by: Thiago Macieira --- src/corelib/plugin/quuid.cpp | 12 +----------- 1 file changed, 1 insertion(+), 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; } /*!