From b55a20fa2c669b181f47ea9219b8e74d1263da19 Mon Sep 17 00:00:00 2001 From: "xiaofeng@google.com" Date: Sat, 22 Sep 2012 02:40:50 +0000 Subject: Down-integrate from internal branch --- src/google/protobuf/wire_format_lite.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/google/protobuf/wire_format_lite.h') diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index e3d5b2d8..cb4fc918 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -41,16 +41,14 @@ #define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ #include +#include #include +#include // for CodedOutputStream::Varint32Size namespace google { namespace protobuf { template class RepeatedField; // repeated_field.h - namespace io { - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h - } } namespace protobuf { @@ -477,6 +475,10 @@ class LIBPROTOBUF_EXPORT WireFormatLite { template static inline int MessageSizeNoVirtual(const MessageType& value); + // Given the length of data, calculate the byte size of the data on the + // wire if we encode the data as a length delimited field. + static inline int LengthDelimitedSize(int length); + private: // A helper method for the repeated primitive reader. This method has // optimizations for primitive types that have fixed size on the wire, and -- cgit v1.2.3