summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 88f2d124..55cbabeb 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -1320,13 +1320,11 @@ bool amount_t::valid() const
return true;
}
-void put_amount(property_tree::ptree& pt, const amount_t& amt,
- bool wrap, bool commodity_details)
+void put_amount(property_tree::ptree& st, const amount_t& amt,
+ bool commodity_details)
{
- property_tree::ptree& st(wrap ? pt.put("amount", "") : pt);
-
if (amt.has_commodity())
- put_commodity(st, amt.commodity(), commodity_details);
+ put_commodity(st.put("commodity", ""), amt.commodity(), commodity_details);
st.put("quantity", amt.quantity_string());
}