QUuid: implement op> in terms of op<

More maintainable, and less code.

Change-Id: Ia99e5deefe4c510fe870076a03ec243ba631a7a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-04-03 21:08:13 +02:00
parent a72b3ab73c
commit 650de56c7f

View File

@ -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;
}
/*!