summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-03 06:11:33 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:36 -0400
commit738287ef7059e34c2f3c894aa3b1f7da3e059975 (patch)
tree0620fe4354be6268d6de9acd97698b12935690f0 /src
parentc59018c29ddfc7a46aeb951fbcd5cb5b93f47ec0 (diff)
downloadfork-ledger-738287ef7059e34c2f3c894aa3b1f7da3e059975.tar.gz
fork-ledger-738287ef7059e34c2f3c894aa3b1f7da3e059975.tar.bz2
fork-ledger-738287ef7059e34c2f3c894aa3b1f7da3e059975.zip
Merged ../commodity_pool
Diffstat (limited to 'src')
-rw-r--r--src/main.cc2
-rw-r--r--src/system.hh3
-rw-r--r--src/textual.cc2
-rw-r--r--src/value.cc2
-rw-r--r--src/xpath.cc2
5 files changed, 6 insertions, 5 deletions
diff --git a/src/main.cc b/src/main.cc
index 25a5fc18..6908be3d 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -408,7 +408,7 @@ int main(int argc, char * argv[], char * envp[])
#if defined(TRACING_ON)
if (i + 1 < argc && std::strcmp(argv[i], "--trace") == 0) {
ledger::_log_level = LOG_TRACE;
- ledger::_trace_level = std::atoi(argv[i + 1]);
+ ledger::_trace_level = lexical_cast<int>(argv[i + 1]);
i++;
}
#endif
diff --git a/src/system.hh b/src/system.hh
index 2cc03413..efad4546 100644
--- a/src/system.hh
+++ b/src/system.hh
@@ -107,10 +107,11 @@ extern "C" {
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/function.hpp>
-#include <boost/multi_index_container.hpp>
+#include <boost/lexical_cast.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index_container.hpp>
#include <boost/operators.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_list.hpp>
diff --git a/src/textual.cc b/src/textual.cc
index 6b36a4ac..6e7e3ee2 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -776,7 +776,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
case 'Y': // set current year
#if 0
// jww (2007-04-18): Need to set this up again
- date_t::current_year = std::atoi(skip_ws(line + 1));
+ date_t::current_year = lexical_cast<int>(skip_ws(line + 1));
#endif
break;
diff --git a/src/value.cc b/src/value.cc
index e1cfa736..4451a543 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1647,7 +1647,7 @@ void value_t::in_place_cast(type_t cast_type)
break;
}
if (alldigits) {
- long temp = std::atol((*(string **) data)->c_str());
+ long temp = lexical_cast<long>((*(string **) data)->c_str());
destroy();
*(long *) data = temp;
} else {
diff --git a/src/xpath.cc b/src/xpath.cc
index fd574cee..86b0c1c4 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 = std::atol(ident.c_str());
+ node->arg_index = lexical_cast<unsigned int>(ident.c_str());
}
else if ((id = document_t::lookup_builtin_id(ident)) != -1) {
node.reset(new op_t(op_t::NODE_ID));