aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBMessage.m
diff options
context:
space:
mode:
Diffstat (limited to 'objectivec/GPBMessage.m')
-rw-r--r--objectivec/GPBMessage.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m
index 77b9dbd3..d1c5594c 100644
--- a/objectivec/GPBMessage.m
+++ b/objectivec/GPBMessage.m
@@ -2563,7 +2563,7 @@ static void MergeRepeatedNotPackedFieldFromCodedInputStream(
#pragma mark - isEqual: & hash Support
-- (BOOL)isEqual:(GPBMessage *)other {
+- (BOOL)isEqual:(id)other {
if (other == self) {
return YES;
}
@@ -2572,9 +2572,10 @@ static void MergeRepeatedNotPackedFieldFromCodedInputStream(
return NO;
}
+ GPBMessage *otherMsg = other;
GPBDescriptor *descriptor = [[self class] descriptor];
uint8_t *selfStorage = (uint8_t *)messageStorage_;
- uint8_t *otherStorage = (uint8_t *)other->messageStorage_;
+ uint8_t *otherStorage = (uint8_t *)otherMsg->messageStorage_;
for (GPBFieldDescriptor *field in descriptor->fields_) {
if (GPBFieldIsMapOrArray(field)) {
@@ -2668,14 +2669,14 @@ static void MergeRepeatedNotPackedFieldFromCodedInputStream(
} // for(fields)
// nil and empty are equal
- if (extensionMap_.count != 0 || other->extensionMap_.count != 0) {
- if (![extensionMap_ isEqual:other->extensionMap_]) {
+ if (extensionMap_.count != 0 || otherMsg->extensionMap_.count != 0) {
+ if (![extensionMap_ isEqual:otherMsg->extensionMap_]) {
return NO;
}
}
// nil and empty are equal
- GPBUnknownFieldSet *otherUnknowns = other->unknownFields_;
+ GPBUnknownFieldSet *otherUnknowns = otherMsg->unknownFields_;
if ([unknownFields_ countOfFields] != 0 ||
[otherUnknowns countOfFields] != 0) {
if (![unknownFields_ isEqual:otherUnknowns]) {