aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Model/FSTMutation.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Model/FSTMutation.mm')
-rw-r--r--Firestore/Source/Model/FSTMutation.mm17
1 files changed, 8 insertions, 9 deletions
diff --git a/Firestore/Source/Model/FSTMutation.mm b/Firestore/Source/Model/FSTMutation.mm
index d124c78..0337fbb 100644
--- a/Firestore/Source/Model/FSTMutation.mm
+++ b/Firestore/Source/Model/FSTMutation.mm
@@ -137,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN
}
FSTSetMutation *otherMutation = (FSTSetMutation *)other;
- return [self.key isEqual:otherMutation.key] && [self.value isEqual:otherMutation.value] &&
+ return self.key == otherMutation.key && [self.value isEqual:otherMutation.value] &&
self.precondition == otherMutation.precondition;
}
@@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN
[maybeDoc class]);
FSTDocument *doc = (FSTDocument *)maybeDoc;
- HARD_ASSERT([doc.key isEqual:self.key], "Can only set a document with the same key");
+ HARD_ASSERT(doc.key == self.key, "Can only set a document with the same key");
return [FSTDocument documentWithData:self.value
key:doc.key
version:doc.version
@@ -212,7 +212,7 @@ NS_ASSUME_NONNULL_BEGIN
}
FSTPatchMutation *otherMutation = (FSTPatchMutation *)other;
- return [self.key isEqual:otherMutation.key] && self.fieldMask == otherMutation.fieldMask &&
+ return self.key == otherMutation.key && self.fieldMask == otherMutation.fieldMask &&
[self.value isEqual:otherMutation.value] &&
self.precondition == otherMutation.precondition;
}
@@ -259,7 +259,7 @@ NS_ASSUME_NONNULL_BEGIN
[maybeDoc class]);
FSTDocument *doc = (FSTDocument *)maybeDoc;
- HARD_ASSERT([doc.key isEqual:self.key], "Can only patch a document with the same key");
+ HARD_ASSERT(doc.key == self.key, "Can only patch a document with the same key");
FSTObjectValue *newData = [self patchObjectValue:doc.data];
return [FSTDocument documentWithData:newData
@@ -312,8 +312,7 @@ NS_ASSUME_NONNULL_BEGIN
}
FSTTransformMutation *otherMutation = (FSTTransformMutation *)other;
- return [self.key isEqual:otherMutation.key] &&
- self.fieldTransforms == otherMutation.fieldTransforms &&
+ return self.key == otherMutation.key && self.fieldTransforms == otherMutation.fieldTransforms &&
self.precondition == otherMutation.precondition;
}
@@ -355,7 +354,7 @@ NS_ASSUME_NONNULL_BEGIN
[maybeDoc class]);
FSTDocument *doc = (FSTDocument *)maybeDoc;
- HARD_ASSERT([doc.key isEqual:self.key], "Can only transform a document with the same key");
+ HARD_ASSERT(doc.key == self.key, "Can only transform a document with the same key");
BOOL hasLocalMutations = (mutationResult == nil);
NSArray<FSTFieldValue *> *transformResults;
@@ -460,7 +459,7 @@ serverTransformResultsWithBaseDocument:(nullable FSTMaybeDocument *)baseDocument
}
FSTDeleteMutation *otherMutation = (FSTDeleteMutation *)other;
- return [self.key isEqual:otherMutation.key] && self.precondition == otherMutation.precondition;
+ return self.key == otherMutation.key && self.precondition == otherMutation.precondition;
}
- (NSUInteger)hash {
@@ -488,7 +487,7 @@ serverTransformResultsWithBaseDocument:(nullable FSTMaybeDocument *)baseDocument
}
if (maybeDoc) {
- HARD_ASSERT([maybeDoc.key isEqual:self.key], "Can only delete a document with the same key");
+ HARD_ASSERT(maybeDoc.key == self.key, "Can only delete a document with the same key");
}
return [FSTDeletedDocument documentWithKey:self.key version:SnapshotVersion::None()];