summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-03-09 12:27:08 -0500
committerCraig Earls <enderw88@gmail.com>2013-03-09 12:27:08 -0500
commitca99c0de03432393aa6576244005c9ad8806fa29 (patch)
treebf0dd4586adb4b7df1adad8a5eff5d2bca36f4e3 /src/amount.cc
parent4c608cccd0c6f06f403882dcca36cb62a40178a2 (diff)
parentbfe360d4c992caf2e7da09ab058599c0404f1348 (diff)
downloadfork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.tar.gz
fork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.tar.bz2
fork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.zip
Merge branch 'next' into ledger-mode-automatic-transactions
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());
}