mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
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.
50 lines
717 B
C++
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
|