diff --git a/include/xrpl/protocol/STEitherAmount.h b/include/xrpl/protocol/STEitherAmount.h index 890270c6ae0..57812221fd7 100644 --- a/include/xrpl/protocol/STEitherAmount.h +++ b/include/xrpl/protocol/STEitherAmount.h @@ -186,7 +186,7 @@ operator==(STEitherAmount const& lhs, STEitherAmount const& rhs) inline bool operator!=(STEitherAmount const& lhs, STEitherAmount const& rhs) { - return !(lhs == rhs); + return !operator==(lhs, rhs); } template diff --git a/include/xrpl/protocol/STMPTAmount.h b/include/xrpl/protocol/STMPTAmount.h index eb87ccff11b..347234ab101 100644 --- a/include/xrpl/protocol/STMPTAmount.h +++ b/include/xrpl/protocol/STMPTAmount.h @@ -93,23 +93,23 @@ class STMPTAmount final : public MPTAmount, int signum() const noexcept; - friend bool - operator==(STMPTAmount const& lhs, STMPTAmount const& rhs); + bool + operator==(STMPTAmount const& rhs); - friend bool - operator!=(STMPTAmount const& lhs, STMPTAmount const& rhs); + bool + operator!=(STMPTAmount const& rhs); }; inline bool -operator==(STMPTAmount const& lhs, STMPTAmount const& rhs) +STMPTAmount::operator==(STMPTAmount const& rhs) { - return lhs.value_ == rhs.value_ && lhs.issue_ == rhs.issue_; + return value_ == rhs.value_ && issue_ == rhs.issue_; } inline bool -operator!=(STMPTAmount const& lhs, STMPTAmount const& rhs) +STMPTAmount::operator!=(STMPTAmount const& rhs) { - return !(lhs == rhs); + return !operator==(rhs); } STMPTAmount