summaryrefslogtreecommitdiff
path: root/balance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'balance.cc')
-rw-r--r--balance.cc21
1 files changed, 1 insertions, 20 deletions
diff --git a/balance.cc b/balance.cc
index 39b1e949..b9898a37 100644
--- a/balance.cc
+++ b/balance.cc
@@ -151,26 +151,7 @@ void report_balances(int argc, char **argv, std::ostream& out)
if (! do_credit)
continue;
- amount * cost = (*x)->cost;
-
- bool allocated = false;
- for (int cycles = 0; cost && cycles < 10; cycles++) {
- std::map<const std::string, amount *>::iterator pi
- = main_ledger.prices.amounts.find(cost->comm_symbol());
-
- if (pi == main_ledger.prices.amounts.end()) {
- balance->credit(cost);
- if (allocated)
- delete cost;
- break;
- } else {
- amount * temp = cost;
- cost = temp->value((*pi).second);
- if (allocated)
- delete temp;
- allocated = true;
- }
- }
+ balance->credit((*x)->cost->street());
}
}
}