summaryrefslogtreecommitdiff
path: root/src/amount.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-31 04:58:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-31 04:58:16 -0400
commitcce65b8dd2f9cb22a20acb891a8a83cdfce90c7b (patch)
tree2cd8e428843848f9b7a9e780c053def5ce245d3c /src/amount.h
parent5a4478481795ac0460c7d9d2e8f90986bee3aece (diff)
downloadfork-ledger-cce65b8dd2f9cb22a20acb891a8a83cdfce90c7b.tar.gz
fork-ledger-cce65b8dd2f9cb22a20acb891a8a83cdfce90c7b.tar.bz2
fork-ledger-cce65b8dd2f9cb22a20acb891a8a83cdfce90c7b.zip
Added a more efficient amount_t::operator==, which changed semantics slightly.
Diffstat (limited to 'src/amount.h')
-rw-r--r--src/amount.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/amount.h b/src/amount.h
index ef9fc4b0..d5c759db 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -781,12 +781,6 @@ inline std::istream& operator>>(std::istream& in, amount_t& amt) {
namespace ledger {
-inline bool amount_t::operator==(const amount_t& amt) const {
- if (commodity() != amt.commodity())
- return false;
- return compare(amt) == 0;
-}
-
inline commodity_t& amount_t::commodity() const {
return has_commodity() ? *commodity_ : *current_pool->null_commodity;
}