diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-05 11:23:38 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-05 11:23:38 +0100 |
commit | ff334a60eb2e74722867dd41b78d7c8c90bc8d0c (patch) | |
tree | 6aca2c954c9ea56bff5690d6ee7e5423a2ac13d8 /csharp/src/Google.Protobuf.Test/Collections | |
parent | 607940321c8ceeb80ec1099d94add8eef86825e5 (diff) |
Change ReadTag and PeekTag to just use 0 as a return value for "end of stream", rather than using an awkward out parameter.
This simplifies quite a lot of code.
Generated code in next commit.
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/Collections')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs b/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs index 322100d0..8c804fdd 100644 --- a/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs +++ b/csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs @@ -455,7 +455,7 @@ namespace Google.Protobuf.Collections Assert.AreEqual(0, output.SpaceLeft); CodedInputStream input = new CodedInputStream(bytes); - Assert.IsTrue(input.ReadTag(out tag)); + tag = input.ReadTag(); RepeatedField<SampleEnum> values = new RepeatedField<SampleEnum>(); values.AddEntriesFrom(input, FieldCodec.ForEnum(tag, x => (int)x, x => (SampleEnum)x)); @@ -493,7 +493,7 @@ namespace Google.Protobuf.Collections Assert.AreEqual(0, output.SpaceLeft); CodedInputStream input = new CodedInputStream(bytes); - Assert.IsTrue(input.ReadTag(out tag)); + tag = input.ReadTag(); RepeatedField<SampleEnum> values = new RepeatedField<SampleEnum>(); values.AddEntriesFrom(input, FieldCodec.ForEnum(tag, x => (int)x, x => (SampleEnum)x)); |