aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/partial_sort.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
commit1f917f69ff07f09b6dbb670971f57f8efe718b84 (patch)
tree99293cbc1411737cd995dac10a99b2c40ef0944c /libcxx/include/__algorithm/partial_sort.h
parent145449b1e420787bb99721a429341fa6be3adfb6 (diff)
Diffstat (limited to 'libcxx/include/__algorithm/partial_sort.h')
-rw-r--r--libcxx/include/__algorithm/partial_sort.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h
index 3870c0cc9335..e008c0c99679 100644
--- a/libcxx/include/__algorithm/partial_sort.h
+++ b/libcxx/include/__algorithm/partial_sort.h
@@ -16,13 +16,10 @@
#include <__algorithm/sort_heap.h>
#include <__config>
#include <__debug>
+#include <__debug_utils/randomize_range.h>
#include <__iterator/iterator_traits.h>
#include <__utility/swap.h>
-#if defined(_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY)
-# include <__algorithm/shuffle.h>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
@@ -55,10 +52,10 @@ void
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
_Compare __comp)
{
- _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last);
+ std::__debug_randomize_range(__first, __last);
typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
_VSTD::__partial_sort<_Comp_ref>(__first, __middle, __last, __comp);
- _LIBCPP_DEBUG_RANDOMIZE_RANGE(__middle, __last);
+ std::__debug_randomize_range(__middle, __last);
}
template <class _RandomAccessIterator>