mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-29 06:55:49 +00:00
Silence warnings
This commit is contained in:
committed by
Elliot Lee
parent
3f33471220
commit
d275a2ab72
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <ripple/basics/XRPAmount.h>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ Number::Guard::round() noexcept
|
||||
auto mode = Number::getround();
|
||||
switch (mode)
|
||||
{
|
||||
// round to nearest if mode is not one of the predefined values
|
||||
default:
|
||||
case to_nearest:
|
||||
if (digits_ > 0x5000'0000'0000'0000)
|
||||
return 1;
|
||||
@@ -506,8 +508,8 @@ to_string(Number const& amount)
|
||||
|
||||
assert(exponent + 43 > 0);
|
||||
|
||||
size_t const pad_prefix = 27;
|
||||
size_t const pad_suffix = 23;
|
||||
ptrdiff_t const pad_prefix = 27;
|
||||
ptrdiff_t const pad_suffix = 23;
|
||||
|
||||
std::string const raw_value(std::to_string(mantissa));
|
||||
std::string val;
|
||||
@@ -517,7 +519,7 @@ to_string(Number const& amount)
|
||||
val.append(raw_value);
|
||||
val.append(pad_suffix, '0');
|
||||
|
||||
size_t const offset(exponent + 43);
|
||||
ptrdiff_t const offset(exponent + 43);
|
||||
|
||||
auto pre_from(val.begin());
|
||||
auto const pre_to(val.begin() + offset);
|
||||
|
||||
Reference in New Issue
Block a user