Index: mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
index 52aafacc0456f17515b206962e3c5f2ccda05923..1fd9cf38cd2f513807a1e511fe9d90c93b4e1236 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
@@ -33,7 +33,7 @@ class {{struct.name}}_Reader { |
// TODO(rockot): Support reading associated kinds. ({{name}}() omitted) |
{%- elif kind|is_enum_kind %} |
{{kind|cpp_result_type}} {{name}}() const { |
- return static_cast<{{kind|cpp_result_type}}>(data_->{{name}}); |
+ return static_cast<{{kind|cpp_result_type}}>(data_->{{name}}.value); |
} |
{%- else %} |
{{kind|cpp_result_type}} {{name}}() const { return data_->{{name}}; } |