| Index: mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl
|
| index 7f363a6ce129f46fb90ef602870ae828919f0368..5973ba294b2d94e8b6d07eadee2672b1f646693d 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/union_data_view_declaration.tmpl
|
| @@ -31,7 +31,7 @@ class {{union.name}}DataView {
|
| {{kind|cpp_data_view_type}}* output);
|
|
|
| template <typename UserType>
|
| - bool Read{{name|under_to_camel}}(UserType* output) {
|
| + WARN_UNUSED_RESULT bool Read{{name|under_to_camel}}(UserType* output) {
|
| DCHECK(is_{{name}}());
|
| return mojo::internal::Deserialize<{{kind|unmapped_type_for_serializer}}>(
|
| data_->data.f_{{name}}.Get(), output, context_);
|
| @@ -39,7 +39,7 @@ class {{union.name}}DataView {
|
|
|
| {%- elif kind|is_enum_kind %}
|
| template <typename UserType>
|
| - bool Read{{name|under_to_camel}}(UserType* output) const {
|
| + WARN_UNUSED_RESULT bool Read{{name|under_to_camel}}(UserType* output) const {
|
| DCHECK(is_{{name}}());
|
| return mojo::internal::Deserialize<{{kind|unmapped_type_for_serializer}}>(
|
| data_->data.f_{{name}}, output);
|
|
|