|
@@ -458,22 +458,21 @@ class LIBPROTOBUF_EXPORT RepeatedPtrFieldBase {
|
|
void AddAllocatedInternal(typename TypeHandler::Type* value,
|
|
void AddAllocatedInternal(typename TypeHandler::Type* value,
|
|
google::protobuf::internal::false_type);
|
|
google::protobuf::internal::false_type);
|
|
|
|
|
|
- template <typename TypeHandler>
|
|
|
|
|
|
+ template <typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
|
|
void AddAllocatedSlowWithCopy(typename TypeHandler::Type* value,
|
|
void AddAllocatedSlowWithCopy(typename TypeHandler::Type* value,
|
|
Arena* value_arena,
|
|
Arena* value_arena,
|
|
Arena* my_arena)
|
|
Arena* my_arena)
|
|
- GOOGLE_ATTRIBUTE_NOINLINE;
|
|
|
|
- template <typename TypeHandler>
|
|
|
|
- void AddAllocatedSlowWithoutCopy(typename TypeHandler::Type* value)
|
|
|
|
- GOOGLE_ATTRIBUTE_NOINLINE;
|
|
|
|
|
|
+;
|
|
|
|
+ template <typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
|
|
|
|
+ void AddAllocatedSlowWithoutCopy(typename TypeHandler::Type* value);
|
|
|
|
|
|
template <typename TypeHandler>
|
|
template <typename TypeHandler>
|
|
typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::true_type);
|
|
typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::true_type);
|
|
template <typename TypeHandler>
|
|
template <typename TypeHandler>
|
|
typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::false_type);
|
|
typename TypeHandler::Type* ReleaseLastInternal(google::protobuf::internal::false_type);
|
|
|
|
|
|
- template<typename TypeHandler>
|
|
|
|
- inline void SwapFallback(RepeatedPtrFieldBase* other) GOOGLE_ATTRIBUTE_NOINLINE;
|
|
|
|
|
|
+ template<typename TypeHandler> GOOGLE_ATTRIBUTE_NOINLINE
|
|
|
|
+ inline void SwapFallback(RepeatedPtrFieldBase* other);
|
|
|
|
|
|
inline Arena* GetArenaNoVirtual() const {
|
|
inline Arena* GetArenaNoVirtual() const {
|
|
return arena_;
|
|
return arena_;
|
|
@@ -545,13 +544,13 @@ class GenericTypeHandler {
|
|
// constructors and destructors. Note that the GOOGLE_ATTRIBUTE_NOINLINE macro
|
|
// constructors and destructors. Note that the GOOGLE_ATTRIBUTE_NOINLINE macro
|
|
// requires the 'inline' storage class here, which is somewhat confusing, but
|
|
// requires the 'inline' storage class here, which is somewhat confusing, but
|
|
// the compiler does the right thing.
|
|
// the compiler does the right thing.
|
|
|
|
+ GOOGLE_ATTRIBUTE_NOINLINE
|
|
static inline GenericType* NewFromPrototype(const GenericType* prototype,
|
|
static inline GenericType* NewFromPrototype(const GenericType* prototype,
|
|
- ::google::protobuf::Arena* arena = NULL)
|
|
|
|
- GOOGLE_ATTRIBUTE_NOINLINE {
|
|
|
|
|
|
+ ::google::protobuf::Arena* arena = NULL) {
|
|
return New(arena);
|
|
return New(arena);
|
|
}
|
|
}
|
|
- static inline void Delete(GenericType* value, Arena* arena)
|
|
|
|
- GOOGLE_ATTRIBUTE_NOINLINE {
|
|
|
|
|
|
+ GOOGLE_ATTRIBUTE_NOINLINE
|
|
|
|
+ static inline void Delete(GenericType* value, Arena* arena) {
|
|
if (arena == NULL) {
|
|
if (arena == NULL) {
|
|
delete value;
|
|
delete value;
|
|
}
|
|
}
|
|
@@ -564,8 +563,9 @@ class GenericTypeHandler {
|
|
}
|
|
}
|
|
|
|
|
|
static inline void Clear(GenericType* value) { value->Clear(); }
|
|
static inline void Clear(GenericType* value) { value->Clear(); }
|
|
- static inline void Merge(const GenericType& from, GenericType* to)
|
|
|
|
- GOOGLE_ATTRIBUTE_NOINLINE {
|
|
|
|
|
|
+
|
|
|
|
+ GOOGLE_ATTRIBUTE_NOINLINE
|
|
|
|
+ static inline void Merge(const GenericType& from, GenericType* to) {
|
|
to->MergeFrom(from);
|
|
to->MergeFrom(from);
|
|
}
|
|
}
|
|
static inline int SpaceUsed(const GenericType& value) {
|
|
static inline int SpaceUsed(const GenericType& value) {
|