Skip to content

Commit

Permalink
Fix copy-pasta
Browse files Browse the repository at this point in the history
  • Loading branch information
frederick-vs-ja committed Sep 1, 2024
1 parent 1f3fde7 commit 5e4b157
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/stable_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ __stable_sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last,
pair<value_type*, ptrdiff_t> __buf(0, 0);
if (__len > static_cast<difference_type>(__stable_sort_switch<value_type>::value)) {
__unique_buf = std::__make_unique_sized_temporary_buffer<value_type>(__len);
__p.first = __unique_buf.get();
__p.second = __unique_buf.get_deleter().__count_;
__buf.first = __unique_buf.get();
__buf.second = __unique_buf.get_deleter().__count_;
}

std::__stable_sort<_AlgPolicy, __comp_ref_type<_Compare> >(__first, __last, __comp, __len, __buf.first, __buf.second);
Expand Down
10 changes: 5 additions & 5 deletions libcxx/include/__memory/unique_temporary_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___MEMORY_SCOPED_TEMPORARY_BUFFER_H
#define _LIBCPP___MEMORY_SCOPED_TEMPORARY_BUFFER_H
#ifndef _LIBCPP___MEMORY_UNIQUE_TEMPORARY_BUFFER_H
#define _LIBCPP___MEMORY_UNIQUE_TEMPORARY_BUFFER_H

#include <__assert>
#include <__config>
Expand All @@ -35,11 +35,11 @@ struct __sized_temporary_buffer_deleter {

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) _NOEXCEPT {
if (__libcpp_is_constant_evaluated()) {
allocator<_Tp>().deallocate(__ptr_, __count_);
allocator<_Tp>().deallocate(__ptr, __count_);
return;
}

std::__libcpp_deallocate_unsized((void*)__ptr_, _LIBCPP_ALIGNOF(_Tp));
std::__libcpp_deallocate_unsized((void*)__ptr, _LIBCPP_ALIGNOF(_Tp));
}
};

Expand Down Expand Up @@ -86,4 +86,4 @@ __make_unique_sized_temporary_buffer(ptrdiff_t __count) {

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___MEMORY_SCOPED_TEMPORARY_BUFFER_H
#endif // _LIBCPP___MEMORY_UNIQUE_TEMPORARY_BUFFER_H

0 comments on commit 5e4b157

Please sign in to comment.