diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-03-21 12:50:09 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-03-21 12:50:47 +0100 |
commit | 3c27067dd2db4c17e7c7c48b4e6db515492559ce (patch) | |
tree | e92deb09b247e0fd5891e61ff427fc71503894f4 /src/primitives | |
parent | 3b4324b1edd7b52bbc0e1f350ab04bc41f343f2e (diff) | |
parent | 0f176927f88084f2f1ce329656878d122fb64623 (diff) |
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.h | 3 |
1 files changed, 2 insertions, 1 deletions
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) |