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

Unified Diff: mojo/converters/array_string/array_string_type_converters.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/converters/array_string/array_string_type_converters.cc
diff --git a/mojo/converters/array_string/array_string_type_converters.cc b/mojo/converters/array_string/array_string_type_converters.cc
index 02019f00bb652ea73f1a55c55eba2bbc872d81c8..84d3c2a20a9d97869c5f36287ba9834746bdba96 100644
--- a/mojo/converters/array_string/array_string_type_converters.cc
+++ b/mojo/converters/array_string/array_string_type_converters.cc
@@ -21,7 +21,7 @@ std::string TypeConverter<std::string, Array<uint8_t>>::Convert(
Array<uint8_t> TypeConverter<Array<uint8_t>, std::string>::Convert(
const std::string& input) {
- Array<uint8_t> result(input.size());
+ auto result = Array<uint8_t>::New(input.size());
memcpy(&result.front(), input.c_str(), input.size());
return result.Pass();
}
« no previous file with comments | « examples/native_run_app/native_run_app.cc ('k') | mojo/converters/array_string/array_string_type_converters_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698