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

Unified Diff: mojo/services/files/public/c/lib/file_fd_impl.cc

Issue 1397133002: Remove callers of mojo::Array<size_t> constructor in favor of ::New (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
Index: mojo/services/files/public/c/lib/file_fd_impl.cc
diff --git a/mojo/services/files/public/c/lib/file_fd_impl.cc b/mojo/services/files/public/c/lib/file_fd_impl.cc
index 1feabddf8aca160827779bae07605c98a8ed5f30..d13cf6bbcbf96b02e7fa6be511dd83bf477fa30c 100644
--- a/mojo/services/files/public/c/lib/file_fd_impl.cc
+++ b/mojo/services/files/public/c/lib/file_fd_impl.cc
@@ -181,7 +181,7 @@ mojio_ssize_t FileFDImpl::Write(const void* buf, size_t count) {
}
// TODO(vtl): Is there a more natural (or efficient) way to do this?
- mojo::Array<uint8_t> bytes_to_write(count);
+ auto bytes_to_write = mojo::Array<uint8_t>::New(count);
if (count > 0)
memcpy(&bytes_to_write[0], buf, count);

Powered by Google App Engine
This is Rietveld 408576698