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

Unified Diff: mojo/services/files/cpp/lib/output_stream_file.cc

Issue 1459033002: Replace (most) occurrences of mojo::Array<T>() with nullptr. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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: mojo/services/files/cpp/lib/output_stream_file.cc
diff --git a/mojo/services/files/cpp/lib/output_stream_file.cc b/mojo/services/files/cpp/lib/output_stream_file.cc
index 07468649463da4d7141e1fff7afca42193a1b81f..4878bcc68fa7868c2298f51444fb47fa863b562d 100644
--- a/mojo/services/files/cpp/lib/output_stream_file.cc
+++ b/mojo/services/files/cpp/lib/output_stream_file.cc
@@ -47,13 +47,13 @@ void OutputStreamFile::Read(uint32_t num_bytes_to_read,
mojo::files::Whence whence,
const ReadCallback& callback) {
if (is_closed_) {
- callback.Run(mojo::files::Error::CLOSED, mojo::Array<uint8_t>());
+ callback.Run(mojo::files::Error::CLOSED, nullptr);
return;
}
// TODO(vtl): Is this what we want? (Also is "unavailable" right? Maybe
// unsupported/EINVAL is better.)
- callback.Run(mojo::files::Error::UNAVAILABLE, mojo::Array<uint8_t>());
+ callback.Run(mojo::files::Error::UNAVAILABLE, nullptr);
}
void OutputStreamFile::Write(mojo::Array<uint8_t> bytes_to_write,
@@ -222,11 +222,11 @@ void OutputStreamFile::Ioctl(uint32_t request,
mojo::Array<uint32_t> in_values,
const IoctlCallback& callback) {
if (is_closed_) {
- callback.Run(mojo::files::Error::CLOSED, mojo::Array<uint32_t>());
+ callback.Run(mojo::files::Error::CLOSED, nullptr);
return;
}
- callback.Run(mojo::files::Error::UNIMPLEMENTED, mojo::Array<uint32_t>());
+ callback.Run(mojo::files::Error::UNIMPLEMENTED, nullptr);
}
} // namespace files_impl

Powered by Google App Engine
This is Rietveld 408576698