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/Core/FSTQuery.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Firestore/Source/Core/FSTQuery.mm') diff --git a/Firestore/Source/Core/FSTQuery.mm b/Firestore/Source/Core/FSTQuery.mm index 0cd11e8..d3961e8 100644 --- a/Firestore/Source/Core/FSTQuery.mm +++ b/Firestore/Source/Core/FSTQuery.mm @@ -28,6 +28,7 @@ #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" #include "Firestore/core/src/firebase/firestore/model/resource_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; @@ -259,7 +260,7 @@ NSString *FSTStringFromQueryRelationOperator(FSTRelationFilterOperator filterOpe } - (NSUInteger)hash { - return _field.Hash(); + return util::Hash(_field); } @end @@ -305,7 +306,7 @@ NSString *FSTStringFromQueryRelationOperator(FSTRelationFilterOperator filterOpe } - (NSUInteger)hash { - return _field.Hash(); + return util::Hash(_field); } @end -- cgit v1.2.3