@@ -62,20 +62,20 @@ namespace graphene { namespace chain {
62
62
FC_ASSERT ( a.asset_id == b.asset_id );
63
63
return a.amount < b.amount ;
64
64
}
65
- friend bool operator <= ( const asset& a, const asset& b )
65
+ friend inline bool operator <= ( const asset& a, const asset& b )
66
66
{
67
- return (a == b) || (a < b );
67
+ return !(b < a );
68
68
}
69
69
70
- friend bool operator != ( const asset& a, const asset& b )
70
+ friend inline bool operator != ( const asset& a, const asset& b )
71
71
{
72
72
return !(a == b);
73
73
}
74
- friend bool operator > ( const asset& a, const asset& b )
74
+ friend inline bool operator > ( const asset& a, const asset& b )
75
75
{
76
- return !(a <= b );
76
+ return (b < a );
77
77
}
78
- friend bool operator >= ( const asset& a, const asset& b )
78
+ friend inline bool operator >= ( const asset& a, const asset& b )
79
79
{
80
80
return !(a < b);
81
81
}
@@ -140,14 +140,14 @@ namespace graphene { namespace chain {
140
140
price operator / ( const asset& base, const asset& quote );
141
141
inline price operator ~( const price& p ) { return price{p.quote ,p.base }; }
142
142
143
- bool operator < ( const asset& a, const asset& b );
144
- bool operator <= ( const asset& a, const asset& b );
145
143
bool operator < ( const price& a, const price& b );
146
- bool operator <= ( const price& a, const price& b );
147
- bool operator > ( const price& a, const price& b );
148
- bool operator >= ( const price& a, const price& b );
149
144
bool operator == ( const price& a, const price& b );
150
- bool operator != ( const price& a, const price& b );
145
+
146
+ inline bool operator > ( const price& a, const price& b ) { return (b < a); }
147
+ inline bool operator <= ( const price& a, const price& b ) { return !(b < a); }
148
+ inline bool operator >= ( const price& a, const price& b ) { return !(a < b); }
149
+ inline bool operator != ( const price& a, const price& b ) { return !(a == b); }
150
+
151
151
asset operator * ( const asset& a, const price& b ); // /< Multiply and round down
152
152
153
153
price operator * ( const price& p, const ratio_type& r );
0 commit comments