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

Unified Diff: util/net/http_body.cc

Issue 700383007: Use implicit_cast<> instead of static_cast<> whenever possible (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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
Index: util/net/http_body.cc
diff --git a/util/net/http_body.cc b/util/net/http_body.cc
index 65d21ebe0479fcc828566146611299991646d294..cd31ab4fa568f45dc6e1c41db087393367ebd3d5 100644
--- a/util/net/http_body.cc
+++ b/util/net/http_body.cc
@@ -43,7 +43,7 @@ ssize_t StringHTTPBodyStream::GetBytesBuffer(uint8_t* buffer, size_t max_len) {
size_t num_bytes_returned =
std::min(std::min(num_bytes_remaining, max_len),
- static_cast<size_t>(std::numeric_limits<ssize_t>::max()));
+ implicit_cast<size_t>(std::numeric_limits<ssize_t>::max()));
memcpy(buffer, &string_[bytes_read_], num_bytes_returned);
bytes_read_ += num_bytes_returned;
return num_bytes_returned;

Powered by Google App Engine
This is Rietveld 408576698