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

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

Issue 909903003: Remove unnecessary/unreachable |return| from generated union code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
index ad30fb72f4ddfa5633df7ccefb07ffa570c53898..9f6f02f0d8a525d480effd45bccce100619bfbfc 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
@@ -31,16 +31,13 @@ bool {{class_name}}::Validate(const void* data,
{% for field in union.fields %}
case {{enum_name}}::{{field.name|upper}}:
{{ validation_macros.validate_union_field(field, union)|indent(6) }}
- break;
{%- endfor %}
default:
ReportValidationError(
mojo::internal::VALIDATION_ERROR_UNKOWN_UNION_TAG,
"unknown tag in {{union.name}}");
return false;
- };
-
- return true;
+ }
}
{{class_name}}::{{class_name}}() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698