| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 - (void)dealloc { | 60 - (void)dealloc { |
| 61 [mutableVarintList_ release]; | 61 [mutableVarintList_ release]; |
| 62 [mutableFixed32List_ release]; | 62 [mutableFixed32List_ release]; |
| 63 [mutableFixed64List_ release]; | 63 [mutableFixed64List_ release]; |
| 64 [mutableLengthDelimitedList_ release]; | 64 [mutableLengthDelimitedList_ release]; |
| 65 [mutableGroupList_ release]; | 65 [mutableGroupList_ release]; |
| 66 | 66 |
| 67 [super dealloc]; | 67 [super dealloc]; |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Direct access is use for speed, to avoid even internally declaring things |
| 71 // read/write, etc. The warning is enabled in the project to ensure code calling |
| 72 // protos can turn on -Wdirect-ivar-access without issues. |
| 73 #pragma clang diagnostic push |
| 74 #pragma clang diagnostic ignored "-Wdirect-ivar-access" |
| 75 |
| 70 - (id)copyWithZone:(NSZone *)zone { | 76 - (id)copyWithZone:(NSZone *)zone { |
| 71 GPBUnknownField *result = | 77 GPBUnknownField *result = |
| 72 [[GPBUnknownField allocWithZone:zone] initWithNumber:number_]; | 78 [[GPBUnknownField allocWithZone:zone] initWithNumber:number_]; |
| 73 result->mutableFixed32List_ = [mutableFixed32List_ copyWithZone:zone]; | 79 result->mutableFixed32List_ = [mutableFixed32List_ copyWithZone:zone]; |
| 74 result->mutableFixed64List_ = [mutableFixed64List_ copyWithZone:zone]; | 80 result->mutableFixed64List_ = [mutableFixed64List_ copyWithZone:zone]; |
| 75 result->mutableLengthDelimitedList_ = | 81 result->mutableLengthDelimitedList_ = |
| 76 [mutableLengthDelimitedList_ copyWithZone:zone]; | 82 [mutableLengthDelimitedList_ copyWithZone:zone]; |
| 77 result->mutableVarintList_ = [mutableVarintList_ copyWithZone:zone]; | 83 result->mutableVarintList_ = [mutableVarintList_ copyWithZone:zone]; |
| 78 if (mutableGroupList_.count) { | 84 if (mutableGroupList_.count) { |
| 79 result->mutableGroupList_ = [[NSMutableArray allocWithZone:zone] | 85 result->mutableGroupList_ = [[NSMutableArray allocWithZone:zone] |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 322 } |
| 317 | 323 |
| 318 - (void)addGroup:(GPBUnknownFieldSet *)value { | 324 - (void)addGroup:(GPBUnknownFieldSet *)value { |
| 319 if (mutableGroupList_ == nil) { | 325 if (mutableGroupList_ == nil) { |
| 320 mutableGroupList_ = [[NSMutableArray alloc] initWithObjects:&value count:1]; | 326 mutableGroupList_ = [[NSMutableArray alloc] initWithObjects:&value count:1]; |
| 321 } else { | 327 } else { |
| 322 [mutableGroupList_ addObject:value]; | 328 [mutableGroupList_ addObject:value]; |
| 323 } | 329 } |
| 324 } | 330 } |
| 325 | 331 |
| 332 #pragma clang diagnostic pop |
| 333 |
| 326 @end | 334 @end |
| OLD | NEW |