aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/API/FIRCollectionReference.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/API/FIRCollectionReference.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/API/FIRCollectionReference.mm')
-rw-r--r--Firestore/Source/API/FIRCollectionReference.mm7
1 files changed, 2 insertions, 5 deletions
diff --git a/Firestore/Source/API/FIRCollectionReference.mm b/Firestore/Source/API/FIRCollectionReference.mm
index cb7b61a..9560d13 100644
--- a/Firestore/Source/API/FIRCollectionReference.mm
+++ b/Firestore/Source/API/FIRCollectionReference.mm
@@ -101,8 +101,7 @@ NS_ASSUME_NONNULL_BEGIN
if (parentPath.empty()) {
return nil;
} else {
- FSTDocumentKey *key =
- [FSTDocumentKey keyWithPath:[FSTResourcePath resourcePathWithCPPResourcePath:parentPath]];
+ FSTDocumentKey *key = [FSTDocumentKey keyWithPath:parentPath];
return [FIRDocumentReference referenceWithKey:key firestore:self.firestore];
}
}
@@ -135,9 +134,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (FIRDocumentReference *)documentWithAutoID {
- const ResourcePath path = self.query.path.Append(CreateAutoId());
- FSTDocumentKey *key =
- [FSTDocumentKey keyWithPath:[FSTResourcePath resourcePathWithCPPResourcePath:path]];
+ FSTDocumentKey *key = [FSTDocumentKey keyWithPath:self.query.path.Append(CreateAutoId())];
return [FIRDocumentReference referenceWithKey:key firestore:self.firestore];
}