| Index: third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h
|
| ===================================================================
|
| --- third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h (revision 216642)
|
| +++ third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h (working copy)
|
| @@ -41,7 +41,6 @@
|
| #include <google/protobuf/message_lite.h>
|
| #include <google/protobuf/repeated_field.h>
|
| #include <google/protobuf/wire_format_lite.h>
|
| -#include <google/protobuf/generated_message_util.h>
|
| #include <google/protobuf/io/coded_stream.h>
|
|
|
|
|
| @@ -749,8 +748,7 @@
|
| return value.ByteSize();
|
| }
|
| inline int WireFormatLite::MessageSize(const MessageLite& value) {
|
| - int size = value.ByteSize();
|
| - return io::CodedOutputStream::VarintSize32(size) + size;
|
| + return LengthDelimitedSize(value.ByteSize());
|
| }
|
|
|
| // See comment on ReadGroupNoVirtual to understand the need for this template
|
| @@ -763,10 +761,14 @@
|
| template<typename MessageType_WorkAroundCppLookupDefect>
|
| inline int WireFormatLite::MessageSizeNoVirtual(
|
| const MessageType_WorkAroundCppLookupDefect& value) {
|
| - int size = value.MessageType_WorkAroundCppLookupDefect::ByteSize();
|
| - return io::CodedOutputStream::VarintSize32(size) + size;
|
| + return LengthDelimitedSize(
|
| + value.MessageType_WorkAroundCppLookupDefect::ByteSize());
|
| }
|
|
|
| +inline int WireFormatLite::LengthDelimitedSize(int length) {
|
| + return io::CodedOutputStream::VarintSize32(length) + length;
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace protobuf
|
|
|
|
|