diff options
author | Gil <mcg@google.com> | 2018-05-01 08:57:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 08:57:31 -0700 |
commit | 51be76700c3b71a0924e8eaf7bac4b02e0130e62 (patch) | |
tree | 06cc3b2501c09507d4394f120fb97ea955b3db5a /Firestore/core/src/firebase/firestore/model/document_key.h | |
parent | 421cd3c24811f2b112fb01a17102e22a914d6673 (diff) |
Define a general hashing utility in C++ (#1195)
This is good enough to make it possible for the new C++ code to
interoperate with existing Objective-C code where `-hash` is required if
you override `-isEqual:`.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/model/document_key.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/model/document_key.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Firestore/core/src/firebase/firestore/model/document_key.h b/Firestore/core/src/firebase/firestore/model/document_key.h index 4bdc04b..7f6478f 100644 --- a/Firestore/core/src/firebase/firestore/model/document_key.h +++ b/Firestore/core/src/firebase/firestore/model/document_key.h @@ -26,6 +26,7 @@ #endif // defined(__OBJC__) #include "Firestore/core/src/firebase/firestore/model/resource_path.h" +#include "Firestore/core/src/firebase/firestore/util/hashing.h" #include "absl/strings/string_view.h" namespace firebase { @@ -61,7 +62,7 @@ class DocumentKey { } NSUInteger Hash() const { - return std::hash<std::string>{}(ToString()); + return util::Hash(ToString()); } #endif |