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

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

Issue 2637393002: Make mojom-generated C++ string constants really constant. (Closed)
Patch Set: Created 3 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/enum_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl
index 087f225517db74e4772c5338adf30c56bfad60e0..9400ca77041e65cf319e0512101d619d4b63ecb6 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl
@@ -45,7 +45,7 @@ inline bool IsKnownEnumValue({{enum_name}} value) {
{%- set enum_name = enum|get_name_for_kind(flatten_nested_kind=True) %}
struct {{enum_name}}_Data {
public:
- static bool const kIsExtensible = {% if enum.extensible %}true{% else %}false{% endif %};
+ static bool constexpr kIsExtensible = {% if enum.extensible %}true{% else %}false{% endif %};
static bool IsKnownValue(int32_t value) {
{%- if enum.fields %}

Powered by Google App Engine
This is Rietveld 408576698