aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-03-06 14:28:04 -0500
committerGravatar GitHub <noreply@github.com>2018-03-06 14:28:04 -0500
commit8311c6432ecff78bedd13e27f64d241659324786 (patch)
tree982484ba69cf17172ee4e1308254a0b76894b7d5 /Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm
parent34ebf10b0acc65f1924d723e82085d4104bc281d (diff)
port paths to FSTDocumentKey (#877)
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only * address changes * address changes
Diffstat (limited to 'Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm')
-rw-r--r--Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm
index 7d5e1e2..b0d6807 100644
--- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm
+++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm
@@ -60,11 +60,10 @@ NS_ASSUME_NONNULL_BEGIN
// Documents are ordered by key, so we can use a prefix scan to narrow down the documents
// we need to match the query against.
- FSTDocumentKey *prefix = [FSTDocumentKey
- keyWithPath:[FSTResourcePath resourcePathWithCPPResourcePath:query.path.Append("")]];
+ FSTDocumentKey *prefix = [FSTDocumentKey keyWithPath:query.path.Append("")];
NSEnumerator<FSTDocumentKey *> *enumerator = [self.docs keyEnumeratorFrom:prefix];
for (FSTDocumentKey *key in enumerator) {
- if (!query.path.IsPrefixOf([key.path toCPPResourcePath])) {
+ if (!query.path.IsPrefixOf(key.path)) {
break;
}
FSTMaybeDocument *maybeDoc = self.docs[key];