From 6355ca279ec738d6b24e7629be25bbb40da8ce0a Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 4 Mar 2012 10:14:50 +0000 Subject: [PATCH] [geometry] Applied patch of Krzysztof Czainski to conditionally avoid using boost numeric cast. Note: we will look for a more general approach later. [SVN r77203] --- .../extensions/gis/geographic/strategies/dms_parser.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp index 5db5fcb85..af746e821 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp @@ -38,7 +38,11 @@ #include #include + +#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) #include +#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) + #include #include @@ -129,7 +133,11 @@ namespace strategy template static inline void assign_dms(dms_value& dms, std::string& value, bool& has_value) { +#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) dms.dms[I] = boost::lexical_cast(value.c_str()); +#else // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) + dms.dms[I] = std::atof(value.c_str()); +#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) dms.has_dms[I] = true; has_value = false; value.clear();