diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-17 13:12:11 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-17 13:12:11 -0700 |
commit | e9a122eb19ec54dbca15da80355ed0c17cada9b1 (patch) | |
tree | fac37489873ccf47777b2e652db580f9315d7bc7 /src/google/protobuf/compiler/cpp | |
parent | b36395b2bac88f70070544c325bc09234cb1f1a6 (diff) | |
parent | 818c5eee08840355d70d2f3bdf1a2f17986a5e70 (diff) | |
download | protobuf-e9a122eb19ec54dbca15da80355ed0c17cada9b1.tar.gz protobuf-e9a122eb19ec54dbca15da80355ed0c17cada9b1.tar.bz2 protobuf-e9a122eb19ec54dbca15da80355ed0c17cada9b1.zip |
Merge pull request #501 from xfxyjwf/down
Down-integrate from internal code base.
Diffstat (limited to 'src/google/protobuf/compiler/cpp')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index af85919a..17f67a7b 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -621,7 +621,7 @@ GenerateSingularFieldHasBits(const FieldDescriptor* field, // has_$name$() methods. vars["has_array_index"] = SimpleItoa(field->index() / 32); vars["has_mask"] = StrCat(strings::Hex(1u << (field->index() % 32), - strings::Hex::ZERO_PAD_8)); + strings::ZERO_PAD_8)); printer->Print(vars, "$inline$" "bool $classname$::has_$name$() const {\n" @@ -3364,7 +3364,7 @@ static string ConditionalToCheckBitmasks(const vector<uint32>& masks) { vector<string> parts; for (int i = 0; i < masks.size(); i++) { if (masks[i] == 0) continue; - string m = StrCat("0x", strings::Hex(masks[i], strings::Hex::ZERO_PAD_8)); + string m = StrCat("0x", strings::Hex(masks[i], strings::ZERO_PAD_8)); // Each xor evaluates to 0 if the expected bits are present. parts.push_back(StrCat("((_has_bits_[", i, "] & ", m, ") ^ ", m, ")")); } @@ -3659,7 +3659,7 @@ GenerateIsInitialized(io::Printer* printer) { printer->Print( "if ((_has_bits_[$i$] & 0x$mask$) != 0x$mask$) return false;\n", "i", SimpleItoa(i), - "mask", StrCat(strings::Hex(mask, strings::Hex::ZERO_PAD_8))); + "mask", StrCat(strings::Hex(mask, strings::ZERO_PAD_8))); } } } |