diff options
author | Adam Cozzette <acozzette@google.com> | 2017-09-12 10:32:01 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-09-14 10:03:57 -0700 |
commit | 13fd045dbb2b4dacea32be162a41d5a4b0d1802f (patch) | |
tree | c219e7eb18b82523e36c6748861c403a14ea66ae /src/google/protobuf/wire_format_lite.h | |
parent | d1bc27caef8377a710370189675cb0958443e8f1 (diff) | |
download | protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.gz protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.bz2 protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.zip |
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/wire_format_lite.h')
-rw-r--r-- | src/google/protobuf/wire_format_lite.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index 3e079ea5..8a1540b7 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -41,10 +41,12 @@ #define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ #include <string> + #include <google/protobuf/stubs/common.h> -#include <google/protobuf/repeated_field.h> +#include <google/protobuf/io/coded_stream.h> #include <google/protobuf/message_lite.h> -#include <google/protobuf/io/coded_stream.h> // for CodedOutputStream::Varint32Size +#include <google/protobuf/stubs/port.h> +#include <google/protobuf/repeated_field.h> // Do UTF-8 validation on string type in Debug build only #ifndef NDEBUG @@ -149,7 +151,7 @@ class LIBPROTOBUF_EXPORT WireFormatLite { // Helper method to get the CppType for a particular Type. static CppType FieldTypeToCppType(FieldType type); - // Given a FieldSescriptor::Type return its WireType + // Given a FieldDescriptor::Type return its WireType static inline WireFormatLite::WireType WireTypeForFieldType( WireFormatLite::FieldType type) { return kWireTypeForFieldType[type]; @@ -256,7 +258,7 @@ class LIBPROTOBUF_EXPORT WireFormatLite { // that file to use these. #ifdef NDEBUG -#define INL GOOGLE_ATTRIBUTE_ALWAYS_INLINE +#define INL GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE #else // Avoid excessive inlining in non-optimized builds. Without other optimizations // the inlining is not going to provide benefits anyway and the huge resulting @@ -712,7 +714,8 @@ class LIBPROTOBUF_EXPORT WireFormatLite { // A helper method for the repeated primitive reader. This method has // optimizations for primitive types that have fixed size on the wire, and // can be read using potentially faster paths. - template <typename CType, enum FieldType DeclaredType> GOOGLE_ATTRIBUTE_ALWAYS_INLINE + template <typename CType, enum FieldType DeclaredType> + GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE static bool ReadRepeatedFixedSizePrimitive( int tag_size, uint32 tag, @@ -721,7 +724,8 @@ class LIBPROTOBUF_EXPORT WireFormatLite { // Like ReadRepeatedFixedSizePrimitive but for packed primitive fields. template <typename CType, enum FieldType DeclaredType> - GOOGLE_ATTRIBUTE_ALWAYS_INLINE static bool ReadPackedFixedSizePrimitive( + GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE + static bool ReadPackedFixedSizePrimitive( google::protobuf::io::CodedInputStream* input, RepeatedField<CType>* value); static const CppType kFieldTypeToCppTypeMap[]; |