From e346fde63bc3989d3278855b1fc0c7a5d67ebe2a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Jun 2020 17:19:19 +0200 Subject: [PATCH] remove commented out code --- .../Google.Protobuf/Collections/MapField.cs | 9 ------ .../Collections/RepeatedField.cs | 32 ------------------- csharp/src/Google.Protobuf/ExtensionSet.cs | 5 --- csharp/src/Google.Protobuf/ExtensionValue.cs | 5 --- csharp/src/Google.Protobuf/UnknownFieldSet.cs | 5 --- 5 files changed, 56 deletions(-) diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index 392e7ea49f..d60ebc5a8a 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -474,15 +474,6 @@ namespace Google.Protobuf.Collections { ctx.CopyStateTo(output); } - - //var message = new Codec.MessageAdapter(codec); - //foreach (var entry in list) - //{ - // message.Key = entry.Key; - // message.Value = entry.Value; - // output.WriteTag(codec.MapTag); - // output.WriteMessage(message); - //} } /// diff --git a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs index c50137b19a..1ce51635a1 100644 --- a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs +++ b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs @@ -216,38 +216,6 @@ namespace Google.Protobuf.Collections { ctx.CopyStateTo(output); } - - //if (count == 0) - //{ - // return; - //} - //var writer = codec.ValueWriter; - //var tag = codec.Tag; - //if (codec.PackedRepeatedField) - //{ - // // Packed primitive type - // int size = CalculatePackedDataSize(codec); - // output.WriteTag(tag); - // output.WriteLength(size); - // for (int i = 0; i < count; i++) - // { - // writer(output, array[i]); - // } - //} - //else - //{ - // // Not packed: a simple tag/value pair for each value. - // // Can't use codec.WriteTagAndValue, as that omits default values. - // for (int i = 0; i < count; i++) - // { - // output.WriteTag(tag); - // writer(output, array[i]); - // if (codec.EndTag != 0) - // { - // output.WriteTag(codec.EndTag); - // } - // } - //} } /// diff --git a/csharp/src/Google.Protobuf/ExtensionSet.cs b/csharp/src/Google.Protobuf/ExtensionSet.cs index 7eb309c988..895b9ae6ea 100644 --- a/csharp/src/Google.Protobuf/ExtensionSet.cs +++ b/csharp/src/Google.Protobuf/ExtensionSet.cs @@ -355,11 +355,6 @@ namespace Google.Protobuf { ctx.CopyStateTo(stream); } - - // foreach (var value in ValuesByNumber.Values) - // { - // value.WriteTo(stream); - // } } /// diff --git a/csharp/src/Google.Protobuf/ExtensionValue.cs b/csharp/src/Google.Protobuf/ExtensionValue.cs index aea7ad6605..ada5d79c80 100644 --- a/csharp/src/Google.Protobuf/ExtensionValue.cs +++ b/csharp/src/Google.Protobuf/ExtensionValue.cs @@ -181,11 +181,6 @@ namespace Google.Protobuf } } - //public void MergeFrom(CodedInputStream input) - //{ - // field.AddEntriesFrom(input, codec); - //} - public void MergeFrom(ref ParseContext ctx) { field.AddEntriesFrom(ref ctx, codec); diff --git a/csharp/src/Google.Protobuf/UnknownFieldSet.cs b/csharp/src/Google.Protobuf/UnknownFieldSet.cs index 1ea88c272f..9888dd1c3d 100644 --- a/csharp/src/Google.Protobuf/UnknownFieldSet.cs +++ b/csharp/src/Google.Protobuf/UnknownFieldSet.cs @@ -81,11 +81,6 @@ namespace Google.Protobuf { ctx.CopyStateTo(output); } - - //foreach (KeyValuePair entry in fields) - //{ - // entry.Value.WriteTo(entry.Key, output); - //} } ///