Files
rippled/src/libxrpl/protocol/MPTAmount.cpp
Bart 1eb0fdac65 refactor: Rename ripple namespace to xrpl (#5982)
This change renames all occurrences of `namespace ripple` and `ripple::` to `namespace xrpl` and `xrpl::`, respectively, as well as the names of test suites. It also provides a script to allow developers to replicate the changes in their local branch or fork to avoid conflicts.
2025-12-11 16:51:49 +00:00

50 lines
717 B
C++

#include <xrpl/protocol/MPTAmount.h>
namespace xrpl {
MPTAmount&
MPTAmount::operator+=(MPTAmount const& other)
{
value_ += other.value();
return *this;
}
MPTAmount&
MPTAmount::operator-=(MPTAmount const& other)
{
value_ -= other.value();
return *this;
}
MPTAmount
MPTAmount::operator-() const
{
return MPTAmount{-value_};
}
bool
MPTAmount::operator==(MPTAmount const& other) const
{
return value_ == other.value_;
}
bool
MPTAmount::operator==(value_type other) const
{
return value_ == other;
}
bool
MPTAmount::operator<(MPTAmount const& other) const
{
return value_ < other.value_;
}
MPTAmount
MPTAmount::minPositiveAmount()
{
return MPTAmount{1};
}
} // namespace xrpl