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

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

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 4 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/struct_data_view_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
index 550258f275016a6608f88072481e078eae9f9c95..6ebf7529383fbfbb58c60334a3098145f6ba611f 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
@@ -84,10 +84,10 @@ class {{struct.name}}DataView {
}
{%- else %}
- {{kind|cpp_wrapper_type}} {{name}}() const {
+ {{kind|cpp_field_type}} {{name}}() const {
{%- if pf.min_version != 0 %}
if (data_->header_.version < {{pf.min_version}})
- return {{kind|cpp_wrapper_type}}{};
+ return {{kind|cpp_field_type}}{};
{%- endif %}
return data_->{{name}};
}

Powered by Google App Engine
This is Rietveld 408576698