mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
more fixes some reverts
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
@@ -127,8 +127,7 @@ IOUAmount::operator-=(IOUAmount const& other)
|
||||
inline IOUAmount
|
||||
IOUAmount::operator-() const
|
||||
{
|
||||
// Negate in unsigned domain to avoid UB when mantissa_ == INT64_MIN
|
||||
return {static_cast<mantissa_type>(-static_cast<std::uint64_t>(mantissa_)), exponent_};
|
||||
return {-mantissa_, exponent_};
|
||||
}
|
||||
|
||||
inline bool
|
||||
|
||||
@@ -112,8 +112,7 @@ public:
|
||||
XRPAmount
|
||||
operator-() const
|
||||
{
|
||||
// Negate in unsigned domain to avoid UB when drops_ == INT64_MIN
|
||||
return XRPAmount{static_cast<value_type>(-static_cast<std::uint64_t>(drops_))};
|
||||
return XRPAmount{-drops_};
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user