| Index: third_party/protobuf/src/google/protobuf/wire_format.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/wire_format.h b/third_party/protobuf/src/google/protobuf/wire_format.h
|
| index de8ea574436ffb3f9cd9dd1d0051b9fc7ae47869..941be75ba1e2adaca25d0981f42db3127552e5e5 100644
|
| --- a/third_party/protobuf/src/google/protobuf/wire_format.h
|
| +++ b/third_party/protobuf/src/google/protobuf/wire_format.h
|
| @@ -85,7 +85,7 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
|
|
| // Compute the byte size of a tag. For groups, this includes both the start
|
| // and end tags.
|
| - static inline size_t TagSize(int field_number, FieldDescriptor::Type type);
|
| + static inline int TagSize(int field_number, FieldDescriptor::Type type);
|
|
|
| // These procedures can be used to implement the methods of Message which
|
| // handle parsing and serialization of the protocol buffer wire format
|
| @@ -122,7 +122,7 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
| // will have their ByteSize() methods called, so their sizes will be cached.
|
| // Therefore, calling this method is sufficient to allow you to call
|
| // WireFormat::SerializeWithCachedSizes() on the same object.
|
| - static size_t ByteSize(const Message& message);
|
| + static int ByteSize(const Message& message);
|
|
|
| // -----------------------------------------------------------------
|
| // Helpers for dealing with unknown fields
|
| @@ -173,11 +173,11 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
| uint8* target);
|
|
|
| // Compute the size of the UnknownFieldSet on the wire.
|
| - static size_t ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields);
|
| + static int ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields);
|
|
|
| // Same thing except for messages that have the message_set_wire_format
|
| // option.
|
| - static size_t ComputeUnknownMessageSetItemsSize(
|
| + static int ComputeUnknownMessageSetItemsSize(
|
| const UnknownFieldSet& unknown_fields);
|
|
|
|
|
| @@ -205,7 +205,7 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
| // Compute size of a single field. If the field is a message type, this
|
| // will call ByteSize() for the embedded message, insuring that it caches
|
| // its size.
|
| - static size_t FieldByteSize(
|
| + static int FieldByteSize(
|
| const FieldDescriptor* field, // Cannot be NULL
|
| const Message& message);
|
|
|
| @@ -218,7 +218,7 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
| const FieldDescriptor* field,
|
| const Message& message,
|
| io::CodedOutputStream* output);
|
| - static size_t MessageSetItemByteSize(
|
| + static int MessageSetItemByteSize(
|
| const FieldDescriptor* field,
|
| const Message& message);
|
|
|
| @@ -226,7 +226,7 @@ class LIBPROTOBUF_EXPORT WireFormat {
|
| // only includes the size of the raw data, and not the size of the total
|
| // length, but for other length-delimited types, the size of the length is
|
| // included.
|
| - static size_t FieldDataOnlyByteSize(
|
| + static int FieldDataOnlyByteSize(
|
| const FieldDescriptor* field, // Cannot be NULL
|
| const Message& message);
|
|
|
| @@ -301,8 +301,7 @@ inline uint32 WireFormat::MakeTag(const FieldDescriptor* field) {
|
| return WireFormatLite::MakeTag(field->number(), WireTypeForField(field));
|
| }
|
|
|
| -inline size_t WireFormat::TagSize(int field_number,
|
| - FieldDescriptor::Type type) {
|
| +inline int WireFormat::TagSize(int field_number, FieldDescriptor::Type type) {
|
| // Some compilers don't like enum -> enum casts, so we implicit_cast to
|
| // int first.
|
| return WireFormatLite::TagSize(field_number,
|
| @@ -316,7 +315,7 @@ inline void WireFormat::VerifyUTF8String(const char* data, int size,
|
| WireFormatLite::VerifyUtf8String(
|
| data, size, static_cast<WireFormatLite::Operation>(op), NULL);
|
| #else
|
| - // Avoid the compiler warning about unused variables.
|
| + // Avoid the compiler warning about unsued variables.
|
| (void)data; (void)size; (void)op;
|
| #endif
|
| }
|
|
|