diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-16 05:37:46 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:52 -0400 |
commit | 8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc (patch) | |
tree | b34a2bee1fa2772050ace252a4c691ffcf927c68 /src/report.cc | |
parent | 023f28630f7ed8f845eab00b137d58cc79b4445b (diff) | |
download | ledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.tar.gz ledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.tar.bz2 ledger-8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc.zip |
Changed scope resolution to use the new value_t.
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/report.cc b/src/report.cc index 5f52d37e..04ed2471 100644 --- a/src/report.cc +++ b/src/report.cc @@ -82,27 +82,24 @@ value_t report_t::ftime(xml::xpath_t::scope_t * locals) #endif } -bool report_t::resolve(const string& name, value_t& result, - xml::xpath_t::scope_t * locals) +optional<value_t> +report_t::resolve(const string& name, xml::xpath_t::scope_t * locals) { const char * p = name.c_str(); switch (*p) { case 'a': if (name == "abbrev") { - result = abbrev(locals); - return true; + return abbrev(locals); } break; case 'f': if (name == "ftime") { - result = ftime(locals); - return true; + return ftime(locals); } break; } - - return xml::xpath_t::scope_t::resolve(name, result, locals); + return xml::xpath_t::scope_t::resolve(name, locals); } xml::xpath_t::ptr_op_t report_t::lookup(const string& name) |