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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl

Issue 2689513003: Add field-initializing constructors to generated mojo structs. (Closed)
Patch Set: rebase Created 3 years, 10 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/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl
index 80527a21ce78a514b61a262112585a7914f3d566..b9e416a9f49c7a4b0400846dfec7500cd613aa08 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl
@@ -1,8 +1,6 @@
// static
{{union.name}}Ptr {{union.name}}::New() {
- {{union.name}}Ptr rv;
- mojo::internal::StructHelper<{{union.name}}>::Initialize(&rv);
- return rv;
+ return {{union.name}}Ptr(base::in_place);
}
{{union.name}}::{{union.name}}() {

Powered by Google App Engine
This is Rietveld 408576698