aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/source_context.pb.cc
diff options
context:
space:
mode:
authorChris Kennelly <ckennelly@google.com>2017-01-24 17:37:33 -0800
committerChris Kennelly <ckennelly@google.com>2017-02-15 11:39:39 -0800
commit9db5b11c9cf2922435b53495b9c1e114525f0428 (patch)
treebe2e4da2021e6d25558ec2595f615724d9839781 /src/google/protobuf/source_context.pb.cc
parent0026dff9f6e7fbea541fd293cbf8ebcd254e374d (diff)
downloadprotobuf-9db5b11c9cf2922435b53495b9c1e114525f0428.tar.gz
protobuf-9db5b11c9cf2922435b53495b9c1e114525f0428.tar.bz2
protobuf-9db5b11c9cf2922435b53495b9c1e114525f0428.zip
Work with truncated tag numbers.
This allows more compact comparisons (1 byte instead of 4 byte immediates on x86) for each possible wire/tag inside each field.
Diffstat (limited to 'src/google/protobuf/source_context.pb.cc')
-rw-r--r--src/google/protobuf/source_context.pb.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc
index 610a9317..b6f5cfce 100644
--- a/src/google/protobuf/source_context.pb.cc
+++ b/src/google/protobuf/source_context.pb.cc
@@ -198,7 +198,8 @@ bool SourceContext::MergePartialFromCodedStream(
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string file_name = 1;
case 1: {
- if (tag == 10u) {
+ if (static_cast<::google::protobuf::uint8>(tag) ==
+ static_cast<::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_file_name()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(