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

Unified Diff: util/file/file_writer.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/file/file_writer.cc
diff --git a/util/file/file_writer.cc b/util/file/file_writer.cc
index 5c7c25dc46dd1a797115882cc6322e8a4bc6da0a..2a3d7c404058e16f31e7776e76e4705f251f81bf 100644
--- a/util/file/file_writer.cc
+++ b/util/file/file_writer.cc
@@ -93,7 +93,7 @@ bool FileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) {
while (size > 0) {
size_t writev_iovec_count =
- std::min(remaining_iovecs, static_cast<size_t>(IOV_MAX));
+ std::min(remaining_iovecs, implicit_cast<size_t>(IOV_MAX));
ssize_t written = HANDLE_EINTR(writev(fd_.get(), iov, writev_iovec_count));
if (written < 0) {
PLOG(ERROR) << "writev";
@@ -113,7 +113,7 @@ bool FileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) {
while (written > 0) {
size_t wrote_this_iovec =
- std::min(static_cast<size_t>(written), iov->iov_len);
+ std::min(implicit_cast<size_t>(written), iov->iov_len);
written -= wrote_this_iovec;
if (wrote_this_iovec < iov->iov_len) {
iov->iov_base =

Powered by Google App Engine
This is Rietveld 408576698