summaryrefslogtreecommitdiff
path: root/src/annotate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/annotate.cc')
-rw-r--r--src/annotate.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/annotate.cc b/src/annotate.cc
index 12016868..8816a89c 100644
--- a/src/annotate.cc
+++ b/src/annotate.cc
@@ -216,19 +216,13 @@ void annotation_t::print(std::ostream& out, bool keep_base,
out << " ((" << *value_expr << "))";
}
-void put_annotation(property_tree::ptree& pt, const annotation_t& details)
+void put_annotation(property_tree::ptree& st, const annotation_t& details)
{
- property_tree::ptree& st(pt.put("annotation", ""));
+ if (details.price)
+ put_amount(st.put("price", ""), *details.price);
- if (details.price) {
- property_tree::ptree& t(st.put("price", ""));
- put_amount(t, *details.price, false);
- }
-
- if (details.date) {
- property_tree::ptree& t(st.put("date", ""));
- put_date(t, *details.date, false);
- }
+ if (details.date)
+ put_date(st.put("date", ""), *details.date);
if (details.tag)
st.put("tag", *details.tag);