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

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

Issue 2339413004: Allow Mojo structs as map keys (Closed)
Patch Set: Address sammc's comments and improve Blink tests Created 4 years, 3 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/wrapper_class_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
index bfd68023090764f3e3fd72fa6f884301c4143e76..4c5ed38c998076b0d6aed51c9624c9ed16defa57 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -46,6 +46,10 @@ class {{export_attribute}} {{struct.name}} {
T, {{struct.name}}>::value>::type* = nullptr>
bool Equals(const T& other) const;
+{%- if struct|is_hashable %}
+ size_t Hash(size_t seed) const;
+{%- endif %}
+
{%- set serialization_result_type = "mojo::WTFArray<uint8_t>"
if for_blink else "mojo::Array<uint8_t>" %}

Powered by Google App Engine
This is Rietveld 408576698