diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:55:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-12 14:55:18 -0400 |
commit | 28c65cda512135bde36542351533941b019b6ee8 (patch) | |
tree | a321ec72cc0aff1a90dabe8ab07500afb1599fac /src/post.cc | |
parent | a1fc3c5cfe2ff1fa01c488d4e130b6592be1f111 (diff) | |
download | fork-ledger-28c65cda512135bde36542351533941b019b6ee8.tar.gz fork-ledger-28c65cda512135bde36542351533941b019b6ee8.tar.bz2 fork-ledger-28c65cda512135bde36542351533941b019b6ee8.zip |
Store metadata values as value_t instead of string
Diffstat (limited to 'src/post.cc')
-rw-r--r-- | src/post.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/post.cc b/src/post.cc index 3ef76f7f..2a8abddc 100644 --- a/src/post.cc +++ b/src/post.cc @@ -59,19 +59,19 @@ bool post_t::has_tag(const mask_t& tag_mask, return false; } -optional<string> post_t::get_tag(const string& tag) const +optional<value_t> post_t::get_tag(const string& tag) const { - if (optional<string> value = item_t::get_tag(tag)) + if (optional<value_t> value = item_t::get_tag(tag)) return value; if (xact) return xact->get_tag(tag); return none; } -optional<string> post_t::get_tag(const mask_t& tag_mask, - const optional<mask_t>& value_mask) const +optional<value_t> post_t::get_tag(const mask_t& tag_mask, + const optional<mask_t>& value_mask) const { - if (optional<string> value = item_t::get_tag(tag_mask, value_mask)) + if (optional<value_t> value = item_t::get_tag(tag_mask, value_mask)) return value; if (xact) return xact->get_tag(tag_mask, value_mask); @@ -715,7 +715,7 @@ void to_xml(std::ostream& out, const post_t& post) } { push_xml z(out, "value"); - out << y.guard(*pair.second.first); + to_xml(out, *pair.second.first); } } else { push_xml z(out, "tag"); |