updated protobuf to 3.18.1
This commit is contained in:
@@ -107,9 +107,9 @@ struct MapEntryFuncs {
|
||||
static const int kKeyFieldNumber = 1;
|
||||
static const int kValueFieldNumber = 2;
|
||||
|
||||
static uint8* InternalSerialize(int field_number, const Key& key,
|
||||
const Value& value, uint8* ptr,
|
||||
io::EpsCopyOutputStream* stream) {
|
||||
static uint8_t* InternalSerialize(int field_number, const Key& key,
|
||||
const Value& value, uint8_t* ptr,
|
||||
io::EpsCopyOutputStream* stream) {
|
||||
ptr = stream->EnsureSpace(ptr);
|
||||
ptr = WireFormatLite::WriteTagToArray(
|
||||
field_number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, ptr);
|
||||
@@ -125,7 +125,7 @@ struct MapEntryFuncs {
|
||||
size_t inner_length =
|
||||
2 + KeyTypeHandler::ByteSize(key) + ValueTypeHandler::ByteSize(value);
|
||||
return inner_length + io::CodedOutputStream::VarintSize32(
|
||||
static_cast<uint32>(inner_length));
|
||||
static_cast<uint32_t>(inner_length));
|
||||
}
|
||||
|
||||
static int GetCachedSize(const Key& key, const Value& value) {
|
||||
@@ -167,9 +167,9 @@ class MapEntryImpl : public Base {
|
||||
static const int kValueFieldNumber = 2;
|
||||
|
||||
// Constants for field tag.
|
||||
static const uint8 kKeyTag =
|
||||
static const uint8_t kKeyTag =
|
||||
GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kKeyFieldNumber, KeyTypeHandler::kWireType);
|
||||
static const uint8 kValueTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(
|
||||
static const uint8_t kValueTag = GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(
|
||||
kValueFieldNumber, ValueTypeHandler::kWireType);
|
||||
static const size_t kTagSize = 1;
|
||||
|
||||
@@ -229,7 +229,7 @@ class MapEntryImpl : public Base {
|
||||
|
||||
const char* _InternalParse(const char* ptr, ParseContext* ctx) final {
|
||||
while (!ctx->Done(&ptr)) {
|
||||
uint32 tag;
|
||||
uint32_t tag;
|
||||
ptr = ReadTag(ptr, &tag);
|
||||
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
|
||||
if (tag == kKeyTag) {
|
||||
@@ -263,8 +263,8 @@ class MapEntryImpl : public Base {
|
||||
return size;
|
||||
}
|
||||
|
||||
::google::protobuf::uint8* _InternalSerialize(::google::protobuf::uint8* ptr,
|
||||
io::EpsCopyOutputStream* stream) const override {
|
||||
::uint8_t* _InternalSerialize(
|
||||
::uint8_t* ptr, io::EpsCopyOutputStream* stream) const override {
|
||||
ptr = KeyTypeHandler::Write(kKeyFieldNumber, key(), ptr, stream);
|
||||
return ValueTypeHandler::Write(kValueFieldNumber, value(), ptr, stream);
|
||||
}
|
||||
@@ -422,7 +422,8 @@ class MapEntryImpl : public Base {
|
||||
|
||||
template <typename UnknownType>
|
||||
const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx,
|
||||
bool (*is_valid)(int), uint32 field_num,
|
||||
bool (*is_valid)(int),
|
||||
uint32_t field_num,
|
||||
InternalMetadata* metadata) {
|
||||
auto entry = NewEntry();
|
||||
ptr = entry->_InternalParse(ptr, ctx);
|
||||
@@ -500,7 +501,7 @@ class MapEntryImpl : public Base {
|
||||
public: // Needed for constructing tables
|
||||
KeyOnMemory key_;
|
||||
ValueOnMemory value_;
|
||||
uint32 _has_bits_[1];
|
||||
uint32_t _has_bits_[1];
|
||||
|
||||
private:
|
||||
friend class ::PROTOBUF_NAMESPACE_ID::Arena;
|
||||
@@ -641,8 +642,8 @@ struct MapEntryHelper<
|
||||
// The proto compiler generates the offsets in this struct as if this was
|
||||
// a regular message. This way the table driven code barely notices it's
|
||||
// dealing with a map field.
|
||||
uint32 _has_bits_; // NOLINT
|
||||
uint32 _cached_size_; // NOLINT
|
||||
uint32_t _has_bits_; // NOLINT
|
||||
uint32_t _cached_size_; // NOLINT
|
||||
KeyOnMemory key_; // NOLINT
|
||||
ValueOnMemory value_; // NOLINT
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user