diff options
author | Jon Skeet <skeet@pobox.com> | 2009-03-05 14:23:17 +0000 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2009-03-05 14:23:17 +0000 |
commit | 7de1aef8488e48d9df35d2207ef28de0ea42a296 (patch) | |
tree | 7808804ff3a15e70932c6dab09965f4816ad1066 /src/ProtocolBuffers/WireFormat.cs | |
parent | 75f4268e601fbd6a0de050b5da4aa7767c86c513 (diff) | |
download | protobuf-7de1aef8488e48d9df35d2207ef28de0ea42a296.tar.gz protobuf-7de1aef8488e48d9df35d2207ef28de0ea42a296.tar.bz2 protobuf-7de1aef8488e48d9df35d2207ef28de0ea42a296.zip |
Avoid creating UnknownFieldSets unless we really have to.
Diffstat (limited to 'src/ProtocolBuffers/WireFormat.cs')
-rw-r--r-- | src/ProtocolBuffers/WireFormat.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ProtocolBuffers/WireFormat.cs b/src/ProtocolBuffers/WireFormat.cs index 2bd0a5aa..8f723d54 100644 --- a/src/ProtocolBuffers/WireFormat.cs +++ b/src/ProtocolBuffers/WireFormat.cs @@ -91,6 +91,10 @@ namespace Google.ProtocolBuffers { return (WireType) (tag & TagTypeMask); } + 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> |