From 0f176927f88084f2f1ce329656878d122fb64623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Fri, 18 Mar 2016 04:14:19 +0000 Subject: Improve COutPoint less operator --- src/primitives/transaction.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/primitives/transaction.h') diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 07ae39e0b4..e124dca365 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -34,7 +34,8 @@ public: friend bool operator<(const COutPoint& a, const COutPoint& b) { - return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n)); + int cmp = a.hash.Compare(b.hash); + return cmp < 0 || (cmp == 0 && a.n < b.n); } friend bool operator==(const COutPoint& a, const COutPoint& b) -- cgit v1.2.3