diff --git a/src/mbgl/style/value.hpp b/src/mbgl/style/value.hpp index fd85ee36c..c5be45091 100644 --- a/src/mbgl/style/value.hpp +++ b/src/mbgl/style/value.hpp @@ -15,29 +15,6 @@ std::string toString(const Value &value); Value parseValue(const JSValue&); -namespace util { -inline bool parseNumericString(const std::string &str, double &result) { - char *end = nullptr; - const char *begin = str.c_str(); - result = std::strtod(begin, &end); - while (*end != '\0' && isspace(*end)) end++; // eat whitespace after the end - return errno == 0 && end - begin == long(str.size()); -} -} // namespace util - -template -T toNumber(const Value &value) { - if (value.is()) { - double val; - return util::parseNumericString(value.get(), val) ? val : 0; - } - else if (value.is()) return value.get(); - else if (value.is()) return value.get(); - else if (value.is()) return value.get(); - else if (value.is()) return value.get(); - else return 0; -} - } // namespace mbgl #endif