summaryrefslogtreecommitdiffstats
path: root/config
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 /config
parentfb0d8859042570a15e0477f1ba6adf638b01db0f (diff)
Use locale insensitive strtod and strtof.
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/configgen/value_converter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/src/vespa/config/configgen/value_converter.cpp b/config/src/vespa/config/configgen/value_converter.cpp
index 81883319e9d..4241b5354fd 100644
--- a/config/src/vespa/config/configgen/value_converter.cpp
+++ b/config/src/vespa/config/configgen/value_converter.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/config/common/exceptions.h>
#include "value_converter.h"
+#include <vespa/config/common/exceptions.h>
+#include <vespa/vespalib/locale/c.h>
using namespace vespalib;
using namespace vespalib::slime;
@@ -34,7 +35,7 @@ double convertValue(const ::vespalib::slime::Inspector & __inspector) {
switch (__inspector.type().getId()) {
case LONG::ID: return static_cast<double>(__inspector.asLong());
case DOUBLE::ID: return static_cast<double>(__inspector.asDouble());
- case STRING::ID: return static_cast<double>(strtod(__inspector.asString().make_string().c_str(), 0));
+ case STRING::ID: return static_cast<double>(vespalib::locale::c::strtod(__inspector.asString().make_string().c_str(), 0));
}
throw InvalidConfigException("Expected double, but got incompatible config type " + __inspector.type().getId());
}