rippled
Loading...
Searching...
No Matches
MPTAmount.cpp
1#include <xrpl/protocol/MPTAmount.h>
2
3namespace ripple {
4
5MPTAmount&
7{
8 value_ += other.value();
9 return *this;
10}
11
14{
15 value_ -= other.value();
16 return *this;
17}
18
21{
22 return MPTAmount{-value_};
23}
24
25bool
27{
28 return value_ == other.value_;
29}
30
31bool
33{
34 return value_ == other;
35}
36
37bool
38MPTAmount::operator<(MPTAmount const& other) const
39{
40 return value_ < other.value_;
41}
42
48
49} // namespace ripple
constexpr value_type value() const
Returns the underlying value.
Definition MPTAmount.h:114
bool operator==(MPTAmount const &other) const
Definition MPTAmount.cpp:26
MPTAmount & operator-=(MPTAmount const &other)
Definition MPTAmount.cpp:13
MPTAmount operator-() const
Definition MPTAmount.cpp:20
bool operator<(MPTAmount const &other) const
Definition MPTAmount.cpp:38
value_type value_
Definition MPTAmount.h:26
MPTAmount & operator+=(MPTAmount const &other)
Definition MPTAmount.cpp:6
static MPTAmount minPositiveAmount()
Definition MPTAmount.cpp:44
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6