Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: third_party/protobuf/objectivec/GPBUnknownField.m

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/protobuf/objectivec/GPBUnknownField.h ('k') | third_party/protobuf/objectivec/GPBUnknownFieldSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698