Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions libcxx/include/string
Original file line number Diff line number Diff line change
Expand Up @@ -1879,8 +1879,6 @@ public:

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __clear_and_shrink() _NOEXCEPT;

private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS bool
__is_long() const _NOEXCEPT {
Expand Down Expand Up @@ -2189,7 +2187,11 @@ private:
__alloc_ = __str.__alloc_;
else {
if (!__str.__is_long()) {
__clear_and_shrink();
if (__is_long()) {
__annotate_delete();
__alloc_traits::deallocate(__alloc_, __get_long_pointer(), capacity() + 1);
__rep_ = __rep();
}
__alloc_ = __str.__alloc_;
} else {
__annotate_delete();
Expand Down Expand Up @@ -3820,18 +3822,6 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 bool basic_string<_CharT, _Traits, _Allocat
return true;
}

// __clear_and_shrink

template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT {
clear();
if (__is_long()) {
__annotate_delete();
__alloc_traits::deallocate(__alloc_, __get_long_pointer(), capacity() + 1);
__rep_ = __rep();
}
}

// operator==

template <class _CharT, class _Traits, class _Allocator>
Expand Down

This file was deleted.

Loading