Index: third_party/inspector_protocol/lib/Parser_cpp.template |
diff --git a/third_party/inspector_protocol/lib/Parser_cpp.template b/third_party/inspector_protocol/lib/Parser_cpp.template |
index 4bf6bebc467eb4b0f5fdcc59f40e3d7d88f83b8a..f3dde5ac218e6f7b19a2861e329f5e1b360ba022 100644 |
--- a/third_party/inspector_protocol/lib/Parser_cpp.template |
+++ b/third_party/inspector_protocol/lib/Parser_cpp.template |
@@ -51,19 +51,13 @@ double charactersToDouble(const uint16_t* characters, size_t length, bool* ok) |
buffer.push_back(static_cast<char>(characters[i])); |
} |
buffer.push_back('\0'); |
- char* endptr; |
- double result = std::strtod(buffer.data(), &endptr); |
- *ok = !(*endptr); |
- return result; |
+ return StringUtil::toDouble(buffer.data(), length, ok); |
} |
double charactersToDouble(const uint8_t* characters, size_t length, bool* ok) |
{ |
std::string buffer(reinterpret_cast<const char*>(characters), length); |
- char* endptr; |
- double result = std::strtod(buffer.data(), &endptr); |
- *ok = !(*endptr); |
- return result; |
+ return StringUtil::toDouble(buffer.data(), length, ok); |
} |
template<typename Char> |