aboutsummaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-19 14:02:56 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-19 14:33:00 +0200
commiteb9594bb25aef4ac9f90d6a83c6dd5003a7f4750 (patch)
tree53aaed9465f4a966b91f69df991a8c696e739770 /document
parentfb0d8859042570a15e0477f1ba6adf638b01db0f (diff)
Use locale insensitive strtod and strtof.
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/select/parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/document/src/vespa/document/select/parser.cpp b/document/src/vespa/document/select/parser.cpp
index 8975c3e511c..ceaf0b0c438 100644
--- a/document/src/vespa/document/select/parser.cpp
+++ b/document/src/vespa/document/select/parser.cpp
@@ -13,6 +13,7 @@
#include <vespa/document/base/exceptions.h>
#include <vespa/document/util/stringutil.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <vespa/vespalib/locale/c.h>
#include <boost/spirit/include/classic_chset.hpp>
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_escape_char.hpp>
@@ -706,7 +707,7 @@ parseNumberValue(DocSelectionGrammar& grammar, tree_node<T>& node) {
}
if (sval.find('.') != vespalib::string::npos) {
char* endptr;
- double val = strtod(sval.c_str(), &endptr);
+ double val = vespalib::locale::c::strtod(sval.c_str(), &endptr);
if (*endptr == '\0') {
return std::unique_ptr<ValueNode>(new FloatValueNode(val));
}