summaryrefslogtreecommitdiff
path: root/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-19 23:10:37 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-19 23:10:37 -0400
commit88634973a29693402edd4eb8e943531354c51893 (patch)
tree550f6fca09e80d1a0877e06c3433b37c5bb2e6d5 /journal.cc
parentd568319495a0695582797de0be4b85e1e06e73b2 (diff)
downloadfork-ledger-88634973a29693402edd4eb8e943531354c51893.tar.gz
fork-ledger-88634973a29693402edd4eb8e943531354c51893.tar.bz2
fork-ledger-88634973a29693402edd4eb8e943531354c51893.zip
Some basic fixes to get things almost running, although we still can't parse
my personal ledger file yet.
Diffstat (limited to 'journal.cc')
-rw-r--r--journal.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/journal.cc b/journal.cc
index 184b090b..7ee8526e 100644
--- a/journal.cc
+++ b/journal.cc
@@ -108,7 +108,7 @@ bool entry_base_t::finalize()
if (! ((*x)->flags & TRANSACTION_VIRTUAL) ||
((*x)->flags & TRANSACTION_BALANCE)) {
amount_t * p = (*x)->cost ? (*x)->cost : &(*x)->amount;
- if (*p) {
+ if (! p->is_null()) {
if (no_amounts) {
balance = *p;
no_amounts = false;
@@ -251,7 +251,7 @@ bool entry_base_t::finalize()
case value_t::AMOUNT:
(*x)->amount = balance.as_amount_lval();
- (*x)->amount.negate();
+ (*x)->amount.in_place_negate();
(*x)->flags |= TRANSACTION_CALCULATED;
balance += (*x)->amount;