summaryrefslogtreecommitdiff
path: root/src/balance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.cc')
-rw-r--r--src/balance.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/balance.cc b/src/balance.cc
index f86d6561..b702cb7b 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -336,12 +336,10 @@ void balance_t::print(std::ostream& out,
amount_printer.close();
}
-void put_balance(property_tree::ptree& pt, const balance_t& bal)
+void put_balance(property_tree::ptree& st, const balance_t& bal)
{
- property_tree::ptree& st(pt.put("balance", ""));
-
foreach (const balance_t::amounts_map::value_type& pair, bal.amounts)
- put_amount(st, pair.second);
+ put_amount(st.add("amount", ""), pair.second);
}
} // namespace ledger