diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-01-12 20:55:47 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2016-01-12 20:55:47 -0800 |
commit | 73c003c309235485c0e53f2075242567c88a72bc (patch) | |
tree | 6cebc5a786a171f341e386a567e9d058354d5c24 /src | |
parent | 937ef23acd2cb7554224b4f9cc33c436e54bddf1 (diff) | |
parent | 9e4f354f14775061ed098c896170d3a2d01a3895 (diff) | |
download | protobuf-73c003c309235485c0e53f2075242567c88a72bc.tar.gz protobuf-73c003c309235485c0e53f2075242567c88a72bc.tar.bz2 protobuf-73c003c309235485c0e53f2075242567c88a72bc.zip |
Merge pull request #1089 from jskeet/map-null
Prohibit null values in maps
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_map_field.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_map_field.cc b/src/google/protobuf/compiler/csharp/csharp_map_field.cc index b493495d..15c68b3f 100644 --- a/src/google/protobuf/compiler/csharp/csharp_map_field.cc +++ b/src/google/protobuf/compiler/csharp/csharp_map_field.cc @@ -62,7 +62,6 @@ void MapFieldGenerator::GenerateMembers(io::Printer* printer) { descriptor_->message_type()->FindFieldByName("value"); variables_["key_type_name"] = type_name(key_descriptor); variables_["value_type_name"] = type_name(value_descriptor); - variables_["true_for_wrappers"] = IsWrapperType(value_descriptor) ? "true" : ""; scoped_ptr<FieldGeneratorBase> key_generator(CreateFieldGenerator(key_descriptor, 1)); scoped_ptr<FieldGeneratorBase> value_generator(CreateFieldGenerator(value_descriptor, 2)); @@ -76,7 +75,7 @@ void MapFieldGenerator::GenerateMembers(io::Printer* printer) { printer->Print( variables_, ", $tag$);\n" - "private readonly pbc::MapField<$key_type_name$, $value_type_name$> $name$_ = new pbc::MapField<$key_type_name$, $value_type_name$>($true_for_wrappers$);\n"); + "private readonly pbc::MapField<$key_type_name$, $value_type_name$> $name$_ = new pbc::MapField<$key_type_name$, $value_type_name$>();\n"); WritePropertyDocComment(printer, descriptor_); AddDeprecatedFlag(printer); printer->Print( |