aboutsummaryrefslogtreecommitdiff
path: root/src/primitives
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-03-21 12:50:09 +0100
committerWladimir J. van der Laan <[email protected]>2016-03-21 12:50:47 +0100
commit3c27067dd2db4c17e7c7c48b4e6db515492559ce (patch)
treee92deb09b247e0fd5891e61ff427fc71503894f4 /src/primitives
parentMerge #7720: [qa] rpc-test: Normalize assert() (diff)
parentImprove COutPoint less operator (diff)
downloaddiscoin-3c27067dd2db4c17e7c7c48b4e6db515492559ce.tar.xz
discoin-3c27067dd2db4c17e7c7c48b4e6db515492559ce.zip
Merge #7712: Improve COutPoint less operator
0f17692 Improve COutPoint less operator (João Barbosa)
Diffstat (limited to 'src/primitives')
-rw-r--r--src/primitives/transaction.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 07ae39e0b..e124dca36 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)