diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-19 14:02:56 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-19 14:33:00 +0200 |
commit | eb9594bb25aef4ac9f90d6a83c6dd5003a7f4750 (patch) | |
tree | 53aaed9465f4a966b91f69df991a8c696e739770 /eval | |
parent | fb0d8859042570a15e0477f1ba6adf638b01db0f (diff) |
Use locale insensitive strtod and strtof.
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/vespa/eval/eval/function.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/eval/src/vespa/eval/eval/function.cpp b/eval/src/vespa/eval/eval/function.cpp index e045985e297..cb3d157c06f 100644 --- a/eval/src/vespa/eval/eval/function.cpp +++ b/eval/src/vespa/eval/eval/function.cpp @@ -7,11 +7,11 @@ #include "call_nodes.h" #include "delete_node.h" #include "aggr.h" +#include <vespa/vespalib/locale/c.h> #include <cctype> #include <map> -namespace vespalib { -namespace eval { +namespace vespalib::eval { using nodes::Node_UP; using nodes::Operator_UP; @@ -417,7 +417,7 @@ void parse_number(ParseContext &ctx) { } } char *end = nullptr; - double value = strtod(str.c_str(), &end); + double value = vespalib::locale::c::strtod(str.c_str(), &end); if (!str.empty() && end == str.data() + str.size()) { ctx.push_expression(Node_UP(new nodes::Number(value))); } else { @@ -906,5 +906,4 @@ Function::unwrap(vespalib::stringref input, //----------------------------------------------------------------------------- -} // namespace vespalib::eval -} // namespace vespalib +} |