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

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

Issue 1550733002: Convert Pass()→std::move() in generated Mojo bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0dbaf8b35416f5c244312681b92341780de8c3c7..8098ff0e5ba85915dd1944a0cece6efff12c51dd 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
@@ -2,7 +2,7 @@
{{union.name}}Ptr {{union.name}}::New() {
{{union.name}}Ptr rv;
mojo::internal::StructHelper<{{union.name}}>::Initialize(&rv);
- return rv.Pass();
+ return rv;
}
{{union.name}}::{{union.name}}() {
@@ -31,7 +31,7 @@
break;
{%- endfor %}
};
- return rv.Pass();
+ return rv;
}
{%- endif %}
@@ -76,7 +76,7 @@ void {{union.name}}::set_{{field.name}}({{field.kind|cpp_const_wrapper_type}} {{
*(data_.{{field.name}}) = {{field.name}};
{% elif field.kind|is_object_kind or field.kind|is_interface_kind or
field.kind|is_associated_kind %}
- *(data_.{{field.name}}) = {{field.name}}.Pass();
+ *(data_.{{field.name}}) = std::move({{field.name}});
{% elif field.kind|is_any_handle_kind %}
data_.{{field.name}}->reset({{field.name}}.release());
{%- else %}
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698