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

Unified Diff: mojo/public/cpp/bindings/lib/native_struct.cc

Issue 2339413004: Allow Mojo structs as map keys (Closed)
Patch Set: Fix merge problem in BUILD.gn file 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/cpp/bindings/lib/native_struct.cc
diff --git a/mojo/public/cpp/bindings/lib/native_struct.cc b/mojo/public/cpp/bindings/lib/native_struct.cc
index 837b75a60e3eb53031c78bcb8dfc946635b48123..2d60eb0d7e2b42d98b713af65dfd3d3655fc98b2 100644
--- a/mojo/public/cpp/bindings/lib/native_struct.cc
+++ b/mojo/public/cpp/bindings/lib/native_struct.cc
@@ -4,6 +4,8 @@
#include "mojo/public/cpp/bindings/native_struct.h"
+#include "mojo/public/cpp/bindings/lib/hash_util.h"
+
namespace mojo {
// static
@@ -27,4 +29,8 @@ bool NativeStruct::Equals(const NativeStruct& other) const {
return data.Equals(other.data);
}
+size_t NativeStruct::Hash(size_t seed) const {
+ return internal::Hash(seed, data);
+}
+
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698