mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add operator+() to uint256.
This commit is contained in:
@@ -138,6 +138,20 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
base_uint& operator+=(const base_uint& b)
|
||||
{
|
||||
uint64 carry = 0;
|
||||
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
{
|
||||
uint64 n = carry + pn[i] + b.pn[i];
|
||||
pn[i] = n & 0xffffffff;
|
||||
carry = n >> 32;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::size_t hash_combine(std::size_t& seed) const
|
||||
{
|
||||
for (int i = 0; i < WIDTH; ++i)
|
||||
|
||||
Reference in New Issue
Block a user