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

Unified Diff: mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl

Issue 164873002: Fix bug with using enums as default values in mojom. We were previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
Index: mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl b/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
index 08c12c59e61e26496fff55a03592b9ea23b7eae9..1c80eeee058d2ce80be91cb2abd661b9dc4d6637 100644
--- a/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
@@ -1,7 +1,7 @@
enum {{enum.name}} {
{%- for field in enum.fields %}
{%- if field.value %}
- {{field.name}} = {{field.value}},
+ {{field.name}} = {{field.value|expression_to_text(module)}},
{%- else %}
{{field.name}},
{%- endif %}

Powered by Google App Engine
This is Rietveld 408576698