| Index: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl
|
| index f4aa314fae9e1987503f7f92388102120e797809..a6b5f35ca760da396b0c3ba7f92f47bb9367d94a 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl
|
| @@ -1,12 +1,11 @@
|
| template <typename StructPtrType>
|
| {{struct.name}}Ptr {{struct.name}}::Clone() const {
|
| - // Use StructPtrType to prevent the compiler from trying to compile this
|
| - // without being asked.
|
| - StructPtrType rv(New());
|
| + return New(
|
| {%- for field in struct.fields %}
|
| - rv->{{field.name}} = mojo::internal::Clone({{field.name}});
|
| + mojo::internal::Clone({{field.name}})
|
| +{%- if not loop.last -%},{%- endif %}
|
| {%- endfor %}
|
| - return rv;
|
| + );
|
| }
|
|
|
| template <typename T,
|
|
|