From 13fd045dbb2b4dacea32be162a41d5a4b0d1802f Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 12 Sep 2017 10:32:01 -0700 Subject: Integrated internal changes from Google --- src/google/protobuf/map_entry.h | 51 +++++------------------------------------ 1 file changed, 6 insertions(+), 45 deletions(-) (limited to 'src/google/protobuf/map_entry.h') diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h index afe809b2..801def97 100644 --- a/src/google/protobuf/map_entry.h +++ b/src/google/protobuf/map_entry.h @@ -87,29 +87,6 @@ class MapEntry : public MapEntryImpl { public: - // Create default MapEntry instance for given descriptor. Descriptor has to be - // given when creating default MapEntry instance because different map field - // may have the same type and MapEntry class. The given descriptor is needed - // to distinguish instances of the same MapEntry class. - static const Reflection* CreateReflection(const Descriptor* descriptor, - const Derived* entry) { - ReflectionSchema schema = { - entry, - offsets_, - has_bits_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, _internal_metadata_), - -1, - -1, - sizeof(MapEntry), - -1, - }; - const Reflection* reflection = new GeneratedMessageReflection( - descriptor, schema, DescriptorPool::generated_pool(), - MessageFactory::generated_factory()); - return reflection; - } - MapEntry() : _internal_metadata_(NULL) {} explicit MapEntry(Arena* arena) : MapEntryImpl -uint32 MapEntry::offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapEntry, value_), -}; - -template -uint32 MapEntry::has_bits_[2] = {0, 1}; - // Specialization for the full runtime template struct MapEntryHelper > - : MapEntryHelper > { + : MapEntryHelper > { explicit MapEntryHelper(const MapPair& map_pair) - : MapEntryHelper >(map_pair) {} + : MapEntryHelper >( + map_pair) {} }; template