diff --git a/src/Config.cpp b/src/Config.cpp index 3da32d102..1bfa69cc6 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -578,7 +578,7 @@ double Config::getReal (const std::string& key) return getReal("urgency.next.coefficient"); if ((*this).find (key) != (*this).end ()) - return std::stod ((*this)[key]); + return strtod ((*this)[key].c_str (), NULL); return 0.0; } diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index 3a6e5d60d..0acd8adc9 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -1874,7 +1874,7 @@ bool ISO8601p::parse (const std::string& input, std::string::size_type& start) Lexer::isSingleCharOperator (n.next ())) { start = original_start + n.cursor (); - double quantity = std::stod (number); + double quantity = strtod (number.c_str (), NULL); // Linear lookup - should instead be logarithmic. double seconds = 1; diff --git a/src/ISO8601.h b/src/ISO8601.h index 4bc3acd37..ddc661914 100644 --- a/src/ISO8601.h +++ b/src/ISO8601.h @@ -27,7 +27,6 @@ #ifndef INCLUDED_ISO8601 #define INCLUDED_ISO8601 -#include #include #include diff --git a/src/Variant.cpp b/src/Variant.cpp index 6d0434468..515999238 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -25,12 +25,12 @@ //////////////////////////////////////////////////////////////////////////////// #include -#include #include #include #include #include #include +#include #include #include #include @@ -1873,8 +1873,8 @@ void Variant::cast (const enum type new_type) case type_integer: _integer = (int) strtol (_string.c_str (), NULL, (_string.substr (0, 2) == "0x" ? 16 : 10)); break; - case type_real: _real = std::stod (_string); break; - case type_string: break; + case type_real: _real = strtod (_string.c_str (), NULL); break; + case type_string: break; case type_date: { _date = 0;