[Liblas-commits] hg: use lexical_cast for testing value instead of
always using a...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Aug 18 11:46:17 EDT 2010
changeset 6e298e1592d8 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=6e298e1592d8
summary: use lexical_cast for testing value instead of always using atoi which was wrong
diffstat:
include/liblas/lasfilter.hpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 34937ecb87e8 -r 6e298e1592d8 include/liblas/lasfilter.hpp
--- a/include/liblas/lasfilter.hpp Wed Aug 18 10:10:03 2010 -0500
+++ b/include/liblas/lasfilter.hpp Wed Aug 18 10:46:10 2010 -0500
@@ -49,6 +49,7 @@
// boost
#include <boost/cstdint.hpp>
#include <boost/function.hpp>
+#include <boost/lexical_cast.hpp>
// std
#include <vector>
#include <functional>
@@ -277,7 +278,8 @@
}
out = filter_string.substr(pos, filter_string.size());
- value = atoi(out.c_str());
+
+ value = boost::lexical_cast<T>(out);
// std::cout << "Value is: " << value << " pos " << pos << " out " << out << std::endl;
More information about the Liblas-commits
mailing list