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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc

Issue 2599263002: third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Address comments Created 3 years, 12 months 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 2015 Google Inc. All rights reserved. 2 // Copyright 2015 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 // Pull over some info from the value's flags. 109 // Pull over some info from the value's flags.
110 const string& value_field_flags = 110 const string& value_field_flags =
111 value_field_generator_->variable("fieldflags"); 111 value_field_generator_->variable("fieldflags");
112 if (value_field_flags.find("GPBFieldHasDefaultValue") != string::npos) { 112 if (value_field_flags.find("GPBFieldHasDefaultValue") != string::npos) {
113 field_flags.push_back("GPBFieldHasDefaultValue"); 113 field_flags.push_back("GPBFieldHasDefaultValue");
114 } 114 }
115 if (value_field_flags.find("GPBFieldHasEnumDescriptor") != string::npos) { 115 if (value_field_flags.find("GPBFieldHasEnumDescriptor") != string::npos) {
116 field_flags.push_back("GPBFieldHasEnumDescriptor"); 116 field_flags.push_back("GPBFieldHasEnumDescriptor");
117 } 117 }
118 variables_["fieldflags"] = BuildFlagsString(field_flags); 118 variables_["fieldflags"] = BuildFlagsString(FLAGTYPE_FIELD, field_flags);
119 119
120 ObjectiveCType value_objc_type = GetObjectiveCType(value_descriptor); 120 ObjectiveCType value_objc_type = GetObjectiveCType(value_descriptor);
121 const bool value_is_object_type = 121 const bool value_is_object_type =
122 ((value_objc_type == OBJECTIVECTYPE_STRING) || 122 ((value_objc_type == OBJECTIVECTYPE_STRING) ||
123 (value_objc_type == OBJECTIVECTYPE_DATA) || 123 (value_objc_type == OBJECTIVECTYPE_DATA) ||
124 (value_objc_type == OBJECTIVECTYPE_MESSAGE)); 124 (value_objc_type == OBJECTIVECTYPE_MESSAGE));
125 if ((GetObjectiveCType(key_descriptor) == OBJECTIVECTYPE_STRING) && 125 if ((GetObjectiveCType(key_descriptor) == OBJECTIVECTYPE_STRING) &&
126 value_is_object_type) { 126 value_is_object_type) {
127 variables_["array_storage_type"] = "NSMutableDictionary"; 127 variables_["array_storage_type"] = "NSMutableDictionary";
128 variables_["array_property_type"] = 128 variables_["array_property_type"] =
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 value_field_generator_->variable("storage_type"); 171 value_field_generator_->variable("storage_type");
172 fwd_decls->insert("@class " + value_storage_type); 172 fwd_decls->insert("@class " + value_storage_type);
173 } 173 }
174 } 174 }
175 175
176 176
177 } // namespace objectivec 177 } // namespace objectivec
178 } // namespace compiler 178 } // namespace compiler
179 } // namespace protobuf 179 } // namespace protobuf
180 } // namespace google 180 } // namespace google
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698