diff options
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectwriter.cc')
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectwriter.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc index c37e671c..6c9bc30e 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -1238,13 +1238,7 @@ bool ProtoStreamObjectWriter::IsMap(const google::protobuf::Field& field) { const google::protobuf::Type* field_type = typeinfo()->GetTypeByTypeUrl(field.type_url()); - // TODO(xiaofeng): Unify option names. - return GetBoolOptionOrDefault(field_type->options(), - "google.protobuf.MessageOptions.map_entry", - false) || - GetBoolOptionOrDefault(field_type->options(), "map_entry", false) || - GetBoolOptionOrDefault(field_type->options(), - "proto2.MessageOptions.map_entry", false); + return google::protobuf::util::converter::IsMap(field, *field_type); } bool ProtoStreamObjectWriter::IsAny(const google::protobuf::Field& field) { @@ -1269,4 +1263,3 @@ bool ProtoStreamObjectWriter::IsStructListValue( } // namespace util } // namespace protobuf } // namespace google - |