more fixes some reverts

Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
Pratik Mankawde
2026-03-24 14:59:53 +00:00
parent 6468412621
commit 09ce8125a0
7 changed files with 49 additions and 66 deletions

View File

@@ -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

View File

@@ -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