summaryrefslogtreecommitdiff
path: root/walk.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-03-16 19:14:30 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:31 -0400
commit9800e3febc456edcafbb172c6bef67526a8481da (patch)
tree358f5ca7500ce774398e2511d16403129dc03051 /walk.cc
parent31b68bbebcf448406020a8177efe6ae2f381d5cb (diff)
downloadfork-ledger-9800e3febc456edcafbb172c6bef67526a8481da.tar.gz
fork-ledger-9800e3febc456edcafbb172c6bef67526a8481da.tar.bz2
fork-ledger-9800e3febc456edcafbb172c6bef67526a8481da.zip
*** empty log message ***
Diffstat (limited to 'walk.cc')
-rw-r--r--walk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/walk.cc b/walk.cc
index cfb9af28..8a60cfaa 100644
--- a/walk.cc
+++ b/walk.cc
@@ -42,7 +42,7 @@ void add_transaction_to(const transaction_t& xact, value_t& value)
transaction_xdata_(xact).dflags & TRANSACTION_COMPOSITE) {
value += transaction_xdata_(xact).composite_amount;
}
- else if (xact.cost || value) {
+ else if (xact.cost || ! value.realzero()) {
value.add(xact.amount, xact.cost);
}
else {
@@ -784,7 +784,7 @@ void sum_accounts(account_t& account)
value_t result;
compute_amount(result, details_t(account));
- if (result)
+ if (! result.realzero())
xdata.total += result;
xdata.total_count += xdata.count;
}