diff options
Diffstat (limited to 'src/google/protobuf/repeated_field.h')
-rw-r--r-- | src/google/protobuf/repeated_field.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index bbdef449..9b87d94b 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -686,7 +686,8 @@ inline const Message& GenericTypeHandler<Message>::default_instance() { return *null; } -class LIBPROTOBUF_EXPORT StringTypeHandler { + +class StringTypeHandler { public: typedef string Type; @@ -983,13 +984,13 @@ inline RepeatedField<Element>::RepeatedField(Arena* arena) : current_size_(0), total_size_(0), rep_(NULL) { - // In case arena is NULL, then we do not create rep_, as code has an invariant - // `rep_ == NULL then arena == NULL`. - if (arena != NULL) { - rep_ = reinterpret_cast<Rep*>( - ::google::protobuf::Arena::CreateArray<char>(arena, kRepHeaderSize)); - rep_->arena = arena; - } + // In case arena is NULL, then we do not create rep_, as code has an invariant + // `rep_ == NULL then arena == NULL`. + if (arena != NULL) { + rep_ = reinterpret_cast<Rep*>( + ::google::protobuf::Arena::CreateArray<char>(arena, kRepHeaderSize)); + rep_->arena = arena; + } } template <typename Element> |