Index: mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
index ebc6048c29253d881deb160df3c3e8209412c8a7..5405fa42fd5bbd38971640c096993a387a4d4459 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl |
@@ -111,7 +111,7 @@ |
{{output}}->{{name}} = mojo::internal::AssociatedInterfaceRequestHelper::PassHandle(&{{input_field}}).release(); |
{%- endif %} |
{%- elif kind|is_enum_kind %} |
- {{output}}->{{name}} = static_cast<int32_t>({{input_field}}); |
+ {{output}}->{{name}}.value = static_cast<int32_t>({{input_field}}); |
{%- else %} |
{{output}}->{{name}} = {{input_field}}; |
{%- endif %} |
@@ -181,7 +181,7 @@ |
&{{output_field}}, |
({{context}})->router->CreateLocalEndpointHandle(mojo::internal::FetchAndReset(&{{input}}->{{name}}))); |
{%- elif kind|is_enum_kind %} |
- {{output_field}} = static_cast<{{kind|cpp_wrapper_type}}>({{input}}->{{name}}); |
+ {{output_field}} = static_cast<{{kind|cpp_wrapper_type}}>({{input}}->{{name}}.value); |
{%- else %} |
{{output_field}} = {{input}}->{{name}}; |
{%- endif %} |