summaryrefslogtreecommitdiff
path: root/src/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-07 10:24:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:38 -0400
commit06e7c2820242ea5130a63305836f822ccb409a92 (patch)
treed59d4ad1e85c0319cebe203858bf1924ffa1d205 /src/journal.cc
parent7868a53b70bd08b79007386dbb5b1590bfb2e457 (diff)
downloadfork-ledger-06e7c2820242ea5130a63305836f822ccb409a92.tar.gz
fork-ledger-06e7c2820242ea5130a63305836f822ccb409a92.tar.bz2
fork-ledger-06e7c2820242ea5130a63305836f822ccb409a92.zip
Rearranged many method names.
Diffstat (limited to 'src/journal.cc')
-rw-r--r--src/journal.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/journal.cc b/src/journal.cc
index 7674bd4d..5ba7d421 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -146,15 +146,15 @@ bool entry_base_t::finalize()
// the balance. This is done for the last eligible commodity.
if (! saw_null && balance && balance.type == value_t::BALANCE &&
- balance.balance().amounts.size() == 2) {
+ balance.to_balance().amounts.size() == 2) {
transactions_list::const_iterator x = transactions.begin();
assert((*x)->amount);
commodity_t& this_comm = (*x)->amount->commodity();
balance_t::amounts_map::const_iterator this_bal =
- balance.balance().amounts.find(&this_comm);
+ balance.to_balance().amounts.find(&this_comm);
balance_t::amounts_map::const_iterator other_bal =
- balance.balance().amounts.begin();
+ balance.to_balance().amounts.begin();
if (this_bal == other_bal)
other_bal++;
@@ -209,12 +209,12 @@ bool entry_base_t::finalize()
balance_t * bal = NULL;
switch (balance.type) {
case value_t::BALANCE_PAIR:
- bal = &balance.balance_pair().quantity;
+ bal = &balance.to_balance_pair().quantity;
// fall through...
case value_t::BALANCE:
if (! bal)
- bal = &balance.balance();
+ bal = &balance.to_balance();
if (bal->amounts.size() < 2) {
balance.cast(value_t::AMOUNT);
@@ -243,7 +243,7 @@ bool entry_base_t::finalize()
// fall through...
case value_t::AMOUNT:
- (*x)->amount = balance.amount().negate();
+ (*x)->amount = balance.to_amount().negate();
(*x)->flags |= TRANSACTION_CALCULATED;
balance += *(*x)->amount;