aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2015-08-05 11:23:38 +0100
committerGravatar Jon Skeet <jonskeet@google.com>2015-08-05 11:23:38 +0100
commitff334a60eb2e74722867dd41b78d7c8c90bc8d0c (patch)
tree6aca2c954c9ea56bff5690d6ee7e5423a2ac13d8 /csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
parent607940321c8ceeb80ec1099d94add8eef86825e5 (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/CodedInputStreamExtensions.cs')
-rw-r--r--csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs b/csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
index 408c7cb9..23af2887 100644
--- a/csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
+++ b/csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
@@ -38,8 +38,7 @@ namespace Google.Protobuf
{
public static void AssertNextTag(this CodedInputStream input, uint expectedTag)
{
- uint tag;
- Assert.IsTrue(input.ReadTag(out tag));
+ uint tag = input.ReadTag();
Assert.AreEqual(expectedTag, tag);
}