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

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

Issue 1065653006: Array and map members for unions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/union_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl
index f29ea2dd589b91b7d440f872ea9bdb144ee270d8..f84f60a73015a2f1e7954cccdc986bd5de32c268 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl
@@ -32,7 +32,7 @@ class {{class_name}} {
// a struct." - Section 9.5.2 ISO/IEC 14882:2011 (The C++ Spec)
union MOJO_ALIGNAS(8) Union_ {
{%- for field in union.fields %}
-{%- if field.kind|is_string_kind or field.kind|is_struct_kind %}
+{%- if field.kind|is_object_kind %}
uint64_t f_{{field.name}};
{%- elif field.kind.spec == 'b' %}
uint8_t f_{{field.name}} : 1;

Powered by Google App Engine
This is Rietveld 408576698