Skip to content

Commit 9de412d

Browse files
refactor
1 parent 2a97f2d commit 9de412d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

libcxx/include/string

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,13 +1210,7 @@ public:
12101210
}
12111211
# endif // _LIBCPP_CXX03_LANG
12121212

1213-
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() {
1214-
// We do not use __reset_internal_buffer() here to avoid the overhead of
1215-
// resetting the object.
1216-
__annotate_delete();
1217-
if (__is_long())
1218-
__alloc_traits::deallocate(__alloc_, __get_long_pointer(), __get_long_cap());
1219-
}
1213+
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 ~basic_string() { __deallocate_buffer_if_long(); }
12201214

12211215
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator __self_view() const _NOEXCEPT {
12221216
return __self_view(typename __self_view::__assume_valid(), data(), size());

0 commit comments

Comments
 (0)