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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.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/module-shared.h.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl
index da99eb380be2c11d59df1a4bc22dad5c6bec0f39..dd13466de18c34affb9bea4cb8bb3cefd9c88a59 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl
@@ -12,10 +12,10 @@ struct MojomTypeTraits<{{kind|get_qualified_name_for_kind}}DataView> {
using Data = {{kind|get_qualified_name_for_kind(internal=True)}};
{%- if kind|is_union_kind %}
using DataAsArrayElement = Data;
- static const MojomTypeCategory category = MojomTypeCategory::UNION;
+ static constexpr MojomTypeCategory category = MojomTypeCategory::UNION;
{%- else %}
using DataAsArrayElement = Pointer<Data>;
- static const MojomTypeCategory category = MojomTypeCategory::STRUCT;
+ static constexpr MojomTypeCategory category = MojomTypeCategory::STRUCT;
{%- endif %}
};
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698