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

Unified Diff: examples/native_run_app/native_run_app.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: examples/native_run_app/native_run_app.cc
diff --git a/examples/native_run_app/native_run_app.cc b/examples/native_run_app/native_run_app.cc
index a736dc369cd6ae47a6731edb7617b6daf14cc1d1..306265f456b21a0ccf833e90543d7480619a9229 100644
--- a/examples/native_run_app/native_run_app.cc
+++ b/examples/native_run_app/native_run_app.cc
@@ -52,7 +52,7 @@ class TerminalConnection {
private:
void Write(const char* s, mojo::files::File::WriteCallback callback) {
size_t length = strlen(s);
- mojo::Array<uint8_t> a(length);
+ auto a = mojo::Array<uint8_t>::New(length);
memcpy(&a[0], s, length);
terminal_->Write(a.Pass(), 0, mojo::files::Whence::FROM_CURRENT, callback);
}
« no previous file with comments | « examples/moterm_example_app/moterm_example_app.cc ('k') | mojo/converters/array_string/array_string_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698