mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge #7712: Improve COutPoint less operator
0f17692 Improve COutPoint less operator (João Barbosa)
This commit is contained in:
commit
3c27067dd2
2 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue