diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-03 06:11:04 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:36 -0400 |
commit | c59018c29ddfc7a46aeb951fbcd5cb5b93f47ec0 (patch) | |
tree | 204d28bfa2bdbfe8d7f550877faa114c1e93859f /src/xpath.cc | |
parent | f9f24fab933266ab8e12da7eef4cc2a906f77350 (diff) | |
download | ledger-c59018c29ddfc7a46aeb951fbcd5cb5b93f47ec0.tar.gz ledger-c59018c29ddfc7a46aeb951fbcd5cb5b93f47ec0.tar.bz2 ledger-c59018c29ddfc7a46aeb951fbcd5cb5b93f47ec0.zip |
Revised how commodities are dealt with.
Diffstat (limited to 'src/xpath.cc')
-rw-r--r-- | src/xpath.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xpath.cc b/src/xpath.cc index a7e1e661..fd574cee 100644 --- a/src/xpath.cc +++ b/src/xpath.cc @@ -654,7 +654,7 @@ xpath_t::parse_value_term(std::istream& in, unsigned short tflags) const int id = -1; if (std::isdigit(ident[0])) { node.reset(new op_t(op_t::ARG_INDEX)); - node->arg_index = lexical_cast<unsigned int>(ident.c_str()); + node->arg_index = std::atol(ident.c_str()); } else if ((id = document_t::lookup_builtin_id(ident)) != -1) { node.reset(new op_t(op_t::NODE_ID)); @@ -2286,7 +2286,7 @@ bool xpath_t::op_t::write(std::ostream& out, } if (! symbol.empty()) { - if (commodity_t::find(symbol)) + if (amount_t::default_pool->find(symbol)) out << '@'; out << symbol; } |