diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-05-27 15:04:06 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-05-27 15:04:06 -0400 |
commit | 40ff94ebef494e2e16107ce2965215ae67c031c1 (patch) | |
tree | b6f6883c9751e6b8e369f078f09397129708d45f /objectivec/GPBMessage.m | |
parent | 86e8f1fd7add7b32f3218d121837b92e1c847e18 (diff) | |
parent | 38b9e74691b484d2521fc6d8f421fc3dc14aa143 (diff) | |
download | protobuf-40ff94ebef494e2e16107ce2965215ae67c031c1.tar.gz protobuf-40ff94ebef494e2e16107ce2965215ae67c031c1.tar.bz2 protobuf-40ff94ebef494e2e16107ce2965215ae67c031c1.zip |
Merge pull request #1617 from thomasvl/more_warnings
Add -Woverriding-method-mismatch.
Diffstat (limited to 'objectivec/GPBMessage.m')
-rw-r--r-- | objectivec/GPBMessage.m | 11 |
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]) { |