Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: third_party/inspector_protocol/lib/Parser_cpp.template

Issue 2846673005: Roll third_party/inspector_protocol to efefa86c3183d307f0a0e53bf568fe57c5b58849 (Closed)
Patch Set: ac Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/debugger/protocol-string-to-double-locale-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « test/inspector/debugger/protocol-string-to-double-locale-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698