aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Model/FSTMutationBatch.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Model/FSTMutationBatch.mm')
-rw-r--r--Firestore/Source/Model/FSTMutationBatch.mm11
1 files changed, 8 insertions, 3 deletions
diff --git a/Firestore/Source/Model/FSTMutationBatch.mm b/Firestore/Source/Model/FSTMutationBatch.mm
index 07aadbb..6598d27 100644
--- a/Firestore/Source/Model/FSTMutationBatch.mm
+++ b/Firestore/Source/Model/FSTMutationBatch.mm
@@ -24,6 +24,10 @@
#import "Firestore/Source/Model/FSTMutation.h"
#import "Firestore/Source/Util/FSTAssert.h"
+#include "Firestore/core/src/firebase/firestore/model/document_key.h"
+
+using firebase::firestore::model::DocumentKey;
+
NS_ASSUME_NONNULL_BEGIN
const FSTBatchID kFSTBatchIDUnknown = -1;
@@ -68,10 +72,11 @@ const FSTBatchID kFSTBatchIDUnknown = -1;
}
- (FSTMaybeDocument *_Nullable)applyTo:(FSTMaybeDocument *_Nullable)maybeDoc
- documentKey:(FSTDocumentKey *)documentKey
+ documentKey:(const DocumentKey &)documentKey
mutationBatchResult:(FSTMutationBatchResult *_Nullable)mutationBatchResult {
FSTAssert(!maybeDoc || [maybeDoc.key isEqualToKey:documentKey],
- @"applyTo: key %@ doesn't match maybeDoc key %@", documentKey, maybeDoc.key);
+ @"applyTo: key %s doesn't match maybeDoc key %s", documentKey.ToString().c_str(),
+ maybeDoc.key.ToString().c_str());
FSTMaybeDocument *baseDoc = maybeDoc;
if (mutationBatchResult) {
FSTAssert(mutationBatchResult.mutationResults.count == self.mutations.count,
@@ -94,7 +99,7 @@ const FSTBatchID kFSTBatchIDUnknown = -1;
}
- (FSTMaybeDocument *_Nullable)applyTo:(FSTMaybeDocument *_Nullable)maybeDoc
- documentKey:(FSTDocumentKey *)documentKey {
+ documentKey:(const DocumentKey &)documentKey {
return [self applyTo:maybeDoc documentKey:documentKey mutationBatchResult:nil];
}