|
|
|
@ -1174,26 +1174,6 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { |
|
|
|
|
ABSL_DEPRECATED("This will be removed in a future release") |
|
|
|
|
int ClearedCount() const; |
|
|
|
|
|
|
|
|
|
#ifndef PROTOBUF_FUTURE_REMOVE_CLEARED_API |
|
|
|
|
// Adds an element to the pool of cleared objects, passing ownership to
|
|
|
|
|
// the RepeatedPtrField. The element must be cleared prior to calling
|
|
|
|
|
// this method.
|
|
|
|
|
//
|
|
|
|
|
// This method cannot be called when either the repeated field or |value| is
|
|
|
|
|
// on an arena; both cases will trigger a ABSL_DCHECK-failure.
|
|
|
|
|
ABSL_DEPRECATED("This will be removed in a future release") |
|
|
|
|
void AddCleared(Element* value); |
|
|
|
|
// Removes and returns a single element from the cleared pool, passing
|
|
|
|
|
// ownership to the caller. The element is guaranteed to be cleared.
|
|
|
|
|
// Requires: ClearedCount() > 0
|
|
|
|
|
//
|
|
|
|
|
// This method cannot be called when the repeated field is on an arena; doing
|
|
|
|
|
// so will trigger a ABSL_DCHECK-failure.
|
|
|
|
|
PROTOBUF_NODISCARD |
|
|
|
|
ABSL_DEPRECATED("This will be removed in a future release") |
|
|
|
|
pointer ReleaseCleared(); |
|
|
|
|
#endif // !PROTOBUF_FUTURE_REMOVE_CLEARED_API
|
|
|
|
|
|
|
|
|
|
// Removes the element referenced by position.
|
|
|
|
|
//
|
|
|
|
|
// Returns an iterator to the element immediately following the removed
|
|
|
|
@ -1593,18 +1573,6 @@ inline int RepeatedPtrField<Element>::ClearedCount() const { |
|
|
|
|
return RepeatedPtrFieldBase::ClearedCount(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef PROTOBUF_FUTURE_REMOVE_CLEARED_API |
|
|
|
|
template <typename Element> |
|
|
|
|
inline void RepeatedPtrField<Element>::AddCleared(Element* value) { |
|
|
|
|
return RepeatedPtrFieldBase::AddCleared<TypeHandler>(value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template <typename Element> |
|
|
|
|
inline Element* RepeatedPtrField<Element>::ReleaseCleared() { |
|
|
|
|
return RepeatedPtrFieldBase::ReleaseCleared<TypeHandler>(); |
|
|
|
|
} |
|
|
|
|
#endif // !PROTOBUF_FUTURE_REMOVE_CLEARED_API
|
|
|
|
|
|
|
|
|
|
template <typename Element> |
|
|
|
|
inline void RepeatedPtrField<Element>::Reserve(int new_size) { |
|
|
|
|
return RepeatedPtrFieldBase::Reserve(new_size); |
|
|
|
|