summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-19 08:06:20 -0400
commitfdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc (patch)
treeb7aa301f7d884315f00c42903778ea549e7833d7 /src/account.cc
parent43ba0bb03807eea3fdcd4dd40fba10b00f823e24 (diff)
downloadfork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.gz
fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.tar.bz2
fork-ledger-fdc7a4e4c5423e79df4ad8905b5a67d45d2f85bc.zip
Factored common parts of entry_t and xact_t into new item_t
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/account.cc b/src/account.cc
index f628817e..fc80a9d6 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -73,7 +73,7 @@ account_t * account_t::find_account(const string& name,
if (! auto_create)
return NULL;
- account = new account_t(owner, this, first);
+ account = new account_t(this, first);
std::pair<accounts_map::iterator, bool> result
= accounts.insert(accounts_map::value_type(first, account));
assert(result.second);
@@ -190,8 +190,7 @@ expr_t::ptr_op_t account_t::lookup(const string& name)
break;
}
- assert(owner == session_t::current);
- return owner->current_report->lookup(name);
+ return session_t::current->current_report->lookup(name);
}
bool account_t::valid() const
@@ -234,7 +233,7 @@ void account_t::calculate_sums()
}
call_scope_t args(*this);
- value_t amount(owner->current_report->get_amount_expr(args));
+ value_t amount(session_t::current->current_report->get_amount_expr(args));
if (! amount.is_null()) {
add_or_set_value(xd.total, amount);
xd.total_count += xd.count;