From 0f0a1dab2d385895fc15968cfee3df07b53c52b9 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Tue, 10 Jul 2018 16:08:18 -0400 Subject: Eliminate unnecessary DocumentKey->FSTDocumentKey conversions (#1507) --- Firestore/Source/Model/FSTMutationBatch.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Firestore/Source/Model/FSTMutationBatch.mm') diff --git a/Firestore/Source/Model/FSTMutationBatch.mm b/Firestore/Source/Model/FSTMutationBatch.mm index b3f4dde..11d83e9 100644 --- a/Firestore/Source/Model/FSTMutationBatch.mm +++ b/Firestore/Source/Model/FSTMutationBatch.mm @@ -77,7 +77,7 @@ const FSTBatchID kFSTBatchIDUnknown = -1; - (FSTMaybeDocument *_Nullable)applyTo:(FSTMaybeDocument *_Nullable)maybeDoc documentKey:(const DocumentKey &)documentKey mutationBatchResult:(FSTMutationBatchResult *_Nullable)mutationBatchResult { - HARD_ASSERT(!maybeDoc || [maybeDoc.key isEqualToKey:documentKey], + HARD_ASSERT(!maybeDoc || maybeDoc.key == documentKey, "applyTo: key %s doesn't match maybeDoc key %s", documentKey.ToString(), maybeDoc.key.ToString()); FSTMaybeDocument *baseDoc = maybeDoc; @@ -90,7 +90,7 @@ const FSTBatchID kFSTBatchIDUnknown = -1; for (NSUInteger i = 0; i < self.mutations.count; i++) { FSTMutation *mutation = self.mutations[i]; FSTMutationResult *_Nullable mutationResult = mutationBatchResult.mutationResults[i]; - if ([mutation.key isEqualToKey:documentKey]) { + if (mutation.key == documentKey) { maybeDoc = [mutation applyTo:maybeDoc baseDocument:baseDoc localWriteTime:self.localWriteTime -- cgit v1.2.3