summaryrefslogtreecommitdiff
path: root/src/ptree.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-19 19:32:40 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-05-20 04:48:05 -0500
commit4681e58d7f3cda2a2ac6d05b6ec1a106f568e029 (patch)
tree488d6531d688c68713baa5c1d70fb37be198b861 /src/ptree.cc
parent303976e563608d8a1f4eb09ac5c9402ae5ce74fd (diff)
downloadfork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.gz
fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.bz2
fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.zip
Converted the Ledger build system to use CMake
Diffstat (limited to 'src/ptree.cc')
-rw-r--r--src/ptree.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ptree.cc b/src/ptree.cc
index db523e99..6fb840e0 100644
--- a/src/ptree.cc
+++ b/src/ptree.cc
@@ -54,7 +54,10 @@ void format_ptree::flush()
property_tree::ptree pt;
- pt.put("ledger.<xmlattr>.version", VERSION);
+ pt.put("ledger.<xmlattr>.version",
+ lexical_cast<string>((Ledger_VERSION_MAJOR << 16) |
+ (Ledger_VERSION_MINOR << 8) |
+ Ledger_VERSION_PATCH));
property_tree::ptree& ct(pt.put("ledger.commodities", ""));
foreach (const commodities_pair& pair, commodities)
@@ -67,11 +70,11 @@ void format_ptree::flush()
foreach (const xact_t * xact, transactions) {
put_xact(tt, *xact);
- property_tree::ptree& post_t(tt.put("postings", ""));
+ property_tree::ptree& post_tree(tt.put("postings", ""));
foreach (const post_t * post, xact->posts)
if (post->has_xdata() &&
post->xdata().has_flags(POST_EXT_VISITED))
- put_post(post_t, *post);
+ put_post(post_tree, *post);
}
switch (format) {