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

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

Issue 1618963006: Mojo C++ bindings: support enum validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_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 087499a0d5d491fc7f65796ccf5563c8a1d37c83..9e39e353de75789f19b95bfe76c6d726ee133a37 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
@@ -34,7 +34,7 @@ bool {{class_name}}::Validate(const void* data,
switch (object->tag) {
{% for field in union.fields %}
case {{enum_name}}::{{field.name|upper}}: {
-{{ validation_macros.validate_union_field(field, union)|indent(8) }}
+ {{ validation_macros.validate_union_field(field, union)|indent(6) }}
}
{%- endfor %}
default: {

Powered by Google App Engine
This is Rietveld 408576698