diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-06 11:40:32 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-06 11:40:32 +0100 |
commit | e7f88ff1294ada0fca19334ed2c844cdb98ea2f6 (patch) | |
tree | 97ab85611ecdc29c56afe217893bafa1d520fc27 /csharp/src/Google.Protobuf/WireFormat.cs | |
parent | ad8a889d1e1e2b0efd5b7579aa57ea5326cda6da (diff) | |
download | protobuf-e7f88ff1294ada0fca19334ed2c844cdb98ea2f6.tar.gz protobuf-e7f88ff1294ada0fca19334ed2c844cdb98ea2f6.tar.bz2 protobuf-e7f88ff1294ada0fca19334ed2c844cdb98ea2f6.zip |
Skip groups properly.
Now the generated code doesn't need to check for end group tags, as it will skip whole groups at a time.
Currently it will ignore extraneous end group tags, which may or may not be a good thing.
Renamed ConsumeLastField to SkipLastField as it felt more natural.
Removed WireFormat.IsEndGroupTag as it's no longer useful.
This mostly fixes issue 688.
(Generated code changes coming in next commit.)
Diffstat (limited to 'csharp/src/Google.Protobuf/WireFormat.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/WireFormat.cs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/csharp/src/Google.Protobuf/WireFormat.cs b/csharp/src/Google.Protobuf/WireFormat.cs index bbd7e4f9..b0e4a41f 100644 --- a/csharp/src/Google.Protobuf/WireFormat.cs +++ b/csharp/src/Google.Protobuf/WireFormat.cs @@ -99,16 +99,6 @@ namespace Google.Protobuf }
/// <summary>
- /// Determines whether the given tag is an end group tag.
- /// </summary>
- /// <param name="tag">The tag to check.</param>
- /// <returns><c>true</c> if the given tag is an end group tag; <c>false</c> otherwise.</returns>
- public static bool IsEndGroupTag(uint tag)
- {
- return (WireType) (tag & TagTypeMask) == WireType.EndGroup;
- }
-
- /// <summary>
/// Given a tag value, determines the field number (the upper 29 bits).
/// </summary>
public static int GetTagFieldNumber(uint tag)
|