aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/model/base_path.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/core/src/firebase/firestore/model/base_path.h')
-rw-r--r--Firestore/core/src/firebase/firestore/model/base_path.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/Firestore/core/src/firebase/firestore/model/base_path.h b/Firestore/core/src/firebase/firestore/model/base_path.h
index bc1f89d..59a9b5a 100644
--- a/Firestore/core/src/firebase/firestore/model/base_path.h
+++ b/Firestore/core/src/firebase/firestore/model/base_path.h
@@ -25,6 +25,7 @@
#include <vector>
#include "Firestore/core/src/firebase/firestore/util/firebase_assert.h"
+#include "Firestore/core/src/firebase/firestore/util/hashing.h"
namespace firebase {
namespace firestore {
@@ -162,13 +163,8 @@ class BasePath {
#if defined(__OBJC__)
// For Objective-C++ hash; to be removed after migration.
// Do NOT use in C++ code.
- NSUInteger Hash() const {
- std::hash<std::string> hash_fn;
- NSUInteger hash_result = 0;
- for (const std::string& segment : segments_) {
- hash_result = hash_result * 31u + hash_fn(segment);
- }
- return hash_result;
+ size_t Hash() const {
+ return util::Hash(segments_);
}
#endif // defined(__OBJC__)