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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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
« no previous file with comments | « mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc ('k') | third_party/WebKit/Source/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aecb32e10b5a68824c9b0a369034d9963274deca..c334a52f983381bdeb063df166a0345607b36982 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/enum_macros.tmpl
@@ -94,14 +94,14 @@ struct hash<{{enum_name}}>
{%- set deleted_value_unused = "false" if empty_value in enum|all_enum_values else "true" %}
namespace WTF {
struct {{hash_fn_name}} {
- static unsigned hash(const {{enum_name}}& value) {
+ static unsigned GetHash(const {{enum_name}}& value) {
using utype = std::underlying_type<{{enum_name}}>::type;
- return DefaultHash<utype>::Hash().hash(static_cast<utype>(value));
+ return DefaultHash<utype>::Hash().GetHash(static_cast<utype>(value));
}
- static bool equal(const {{enum_name}}& left, const {{enum_name}}& right) {
+ static bool Equal(const {{enum_name}}& left, const {{enum_name}}& right) {
return left == right;
}
- static const bool safeToCompareToEmptyOrDeleted = true;
+ static const bool safe_to_compare_to_empty_or_deleted = true;
};
template <>
@@ -117,13 +117,13 @@ struct HashTraits<{{enum_name}}>
static_assert({{deleted_value_unused}},
"{{deleted_value}} is a reserved enum value");
static const bool hasIsEmptyValueFunction = true;
- static bool isEmptyValue(const {{enum_name}}& value) {
+ static bool IsEmptyValue(const {{enum_name}}& value) {
return value == static_cast<{{enum_name}}>({{empty_value}});
}
- static void constructDeletedValue({{enum_name}}& slot, bool) {
+ static void ConstructDeletedValue({{enum_name}}& slot, bool) {
slot = static_cast<{{enum_name}}>({{deleted_value}});
}
- static bool isDeletedValue(const {{enum_name}}& value) {
+ static bool IsDeletedValue(const {{enum_name}}& value) {
return value == static_cast<{{enum_name}}>({{deleted_value}});
}
};
« no previous file with comments | « mojo/public/cpp/bindings/tests/wtf_hash_unittest.cc ('k') | third_party/WebKit/Source/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698