mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add constexpr constructor for base_uint
This commit is contained in:
committed by
Nik Bougalis
parent
95426efb8a
commit
85307b29d0
@@ -96,12 +96,8 @@ getBookBase(Book const& book)
|
||||
uint256
|
||||
getQualityNext(uint256 const& uBase)
|
||||
{
|
||||
static uint256 const nextq = []() {
|
||||
uint256 x;
|
||||
(void)x.parseHex(
|
||||
"0000000000000000000000000000000000000000000000010000000000000000");
|
||||
return x;
|
||||
}();
|
||||
static constexpr uint256 nextq(
|
||||
"0000000000000000000000000000000000000000000000010000000000000000");
|
||||
return uBase + nextq;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,11 +55,8 @@ to_string(Currency const& currency)
|
||||
if (currency == noCurrency())
|
||||
return "1";
|
||||
|
||||
static Currency const sIsoBits = []() {
|
||||
Currency c;
|
||||
(void)c.parseHex("FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF");
|
||||
return c;
|
||||
}();
|
||||
static constexpr Currency sIsoBits(
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF");
|
||||
|
||||
if ((currency & sIsoBits).isZero())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user