mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 04:25:51 +00:00
Optimize uint's operator== and operator!= to not do byte-by-byte compares.
This commit is contained in:
@@ -206,12 +206,12 @@ public:
|
||||
|
||||
friend inline bool operator==(const base_uint& a, const base_uint& b)
|
||||
{
|
||||
return !compare(a, b);
|
||||
return memcmp(a.pn, b.pn, sizeof(a.pn)) == 0;
|
||||
}
|
||||
|
||||
friend inline bool operator!=(const base_uint& a, const base_uint& b)
|
||||
{
|
||||
return !!compare(a, b);
|
||||
return memcmp(a.pn, b.pn, sizeof(a.pn)) != 0;
|
||||
}
|
||||
|
||||
std::string GetHex() const
|
||||
|
||||
Reference in New Issue
Block a user