From 04a28fce81c737b6505e6c542a14d8529c9f891d Mon Sep 17 00:00:00 2001 From: Gil Date: Sun, 6 May 2018 14:12:20 -0700 Subject: Make BasePath hash directly as a range (#1232) Remove BasePath.Hash() Objective-C compatibility method Make DocumentKey's hasher use BasePath's segment-based hash code. --- Firestore/Source/API/FIRFieldPath.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Firestore/Source/API') diff --git a/Firestore/Source/API/FIRFieldPath.mm b/Firestore/Source/API/FIRFieldPath.mm index d0d8714..4fd0022 100644 --- a/Firestore/Source/API/FIRFieldPath.mm +++ b/Firestore/Source/API/FIRFieldPath.mm @@ -25,6 +25,7 @@ #import "Firestore/Source/Util/FSTUsageValidation.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" +#include "Firestore/core/src/firebase/firestore/util/hashing.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" namespace util = firebase::firestore::util; @@ -114,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSUInteger)hash { - return _internalValue.Hash(); + return util::Hash(_internalValue); } - (const firebase::firestore::model::FieldPath &)internalValue { -- cgit v1.2.3