diff options
author | Adam Cozzette <acozzette@google.com> | 2017-09-12 10:32:01 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-09-14 10:03:57 -0700 |
commit | 13fd045dbb2b4dacea32be162a41d5a4b0d1802f (patch) | |
tree | c219e7eb18b82523e36c6748861c403a14ea66ae /src/google/protobuf/map_field.h | |
parent | d1bc27caef8377a710370189675cb0958443e8f1 (diff) | |
download | protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.gz protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.bz2 protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.zip |
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/map_field.h')
-rw-r--r-- | src/google/protobuf/map_field.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h index bd478901..6c75a6da 100644 --- a/src/google/protobuf/map_field.h +++ b/src/google/protobuf/map_field.h @@ -217,8 +217,9 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> { // Define message type for internal repeated field. typedef Derived EntryType; - typedef MapEntryLite<Key, T, kKeyFieldType, kValueFieldType, - default_enum_value> EntryLiteType; + typedef MapEntryLite<Derived, Key, T, kKeyFieldType, kValueFieldType, + default_enum_value> + EntryLiteType; // Define abbreviation for parent MapFieldLite typedef MapFieldLite<Derived, Key, T, kKeyFieldType, kValueFieldType, @@ -295,11 +296,13 @@ class MapField : public TypeDefinedMapFieldBase<Key, T> { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapField); }; -template <typename MEntry> -struct MapEntryToMapField { - typedef DeconstructMapEntry<typename MEntry::SuperType> T; - typedef MapField<MEntry, typename T::Key, typename T::Value, T::kKeyFieldType, - T::kValueFieldType, T::default_enum_value> +template <typename T, typename Key, typename Value, + WireFormatLite::FieldType kKeyFieldType, + WireFormatLite::FieldType kValueFieldType, int default_enum_value> +struct MapEntryToMapField<MapEntry<T, Key, Value, kKeyFieldType, + kValueFieldType, default_enum_value> > { + typedef MapField<T, Key, Value, kKeyFieldType, kValueFieldType, + default_enum_value> MapFieldType; }; |