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

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

Issue 2247083003: Mojo C++ bindings: extract code shared by different variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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/validation_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
index 367be6d67b56957b5d05af9122f2214f2883e6ef..a50a585c09a89a0c813bd1cddfb7e4b52f27a405 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
@@ -66,7 +66,7 @@
{#- Validates the specified field, which is supposed to be an enum.
This macro is expanded by the Validate() method. #}
{%- macro validate_enum(field, field_expr) %}
- if (!{{field.kind|get_qualified_name_for_kind(internal=True)}}
+ if (!{{field.kind|get_qualified_name_for_kind(internal=True,flatten_nested_kind=True)}}
::Validate({{field_expr}}, validation_context))
return false;
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698