Merge #7712: Improve COutPoint less operator

0f17692 Improve COutPoint less operator (João Barbosa)
This commit is contained in:
Wladimir J. van der Laan
2016-03-21 12:50:09 +01:00
2 changed files with 7 additions and 4 deletions

View File

@@ -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)