diff options
author | Konstantin Varlamov <var-const@users.noreply.github.com> | 2018-07-10 16:08:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-10 16:08:18 -0400 |
commit | 0f0a1dab2d385895fc15968cfee3df07b53c52b9 (patch) | |
tree | e61d62b40447a744b2a05319aa4e4ba74e35dbd4 /Firestore/Source/Model/FSTMutationBatch.mm | |
parent | ff95ffc61b6c6cf4b8ec69183d35e08497fbfd1a (diff) |
Eliminate unnecessary DocumentKey->FSTDocumentKey conversions (#1507)
Diffstat (limited to 'Firestore/Source/Model/FSTMutationBatch.mm')
-rw-r--r-- | Firestore/Source/Model/FSTMutationBatch.mm | 4 |
1 files changed, 2 insertions, 2 deletions
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 |