[libcxx-commits] [PATCH] D116382: [libc++] [NFC] Remove an unused parameter from `__sift_down`
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 29 11:19:59 PST 2021
Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, philnik, jloser, libc++, nilayvaish.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
Get this NFC change out of the way so it's not distracting me as I think about https://github.com/llvm/llvm-project/issues/10008 :)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116382
Files:
libcxx/include/__algorithm/make_heap.h
libcxx/include/__algorithm/partial_sort.h
libcxx/include/__algorithm/partial_sort_copy.h
libcxx/include/__algorithm/pop_heap.h
libcxx/include/__algorithm/sift_down.h
Index: libcxx/include/__algorithm/sift_down.h
===================================================================
--- libcxx/include/__algorithm/sift_down.h
+++ libcxx/include/__algorithm/sift_down.h
@@ -21,8 +21,7 @@
template <class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void
-__sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/,
- _Compare __comp,
+__sift_down(_RandomAccessIterator __first, _Compare __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
_RandomAccessIterator __start)
{
@@ -46,7 +45,7 @@
// check if we are in heap-order
if (__comp(*__child_i, *__start))
- // we are, __start is larger than it's largest child
+ // we are, __start is larger than its largest child
return;
value_type __top(_VSTD::move(*__start));
Index: libcxx/include/__algorithm/pop_heap.h
===================================================================
--- libcxx/include/__algorithm/pop_heap.h
+++ libcxx/include/__algorithm/pop_heap.h
@@ -31,7 +31,7 @@
if (__len > 1)
{
swap(*__first, *--__last);
- _VSTD::__sift_down<_Compare>(__first, __last, __comp, __len - 1, __first);
+ _VSTD::__sift_down<_Compare>(__first, __comp, __len - 1, __first);
}
}
Index: libcxx/include/__algorithm/partial_sort_copy.h
===================================================================
--- libcxx/include/__algorithm/partial_sort_copy.h
+++ libcxx/include/__algorithm/partial_sort_copy.h
@@ -40,7 +40,7 @@
if (__comp(*__first, *__result_first))
{
*__result_first = *__first;
- _VSTD::__sift_down<_Compare>(__result_first, __r, __comp, __len, __result_first);
+ _VSTD::__sift_down<_Compare>(__result_first, __comp, __len, __result_first);
}
_VSTD::__sort_heap<_Compare>(__result_first, __r, __comp);
}
Index: libcxx/include/__algorithm/partial_sort.h
===================================================================
--- libcxx/include/__algorithm/partial_sort.h
+++ libcxx/include/__algorithm/partial_sort.h
@@ -40,7 +40,7 @@
if (__comp(*__i, *__first))
{
swap(*__i, *__first);
- _VSTD::__sift_down<_Compare>(__first, __middle, __comp, __len, __first);
+ _VSTD::__sift_down<_Compare>(__first, __comp, __len, __first);
}
}
_VSTD::__sort_heap<_Compare>(__first, __middle, __comp);
Index: libcxx/include/__algorithm/make_heap.h
===================================================================
--- libcxx/include/__algorithm/make_heap.h
+++ libcxx/include/__algorithm/make_heap.h
@@ -32,7 +32,7 @@
// start from the first parent, there is no need to consider children
for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start)
{
- _VSTD::__sift_down<_Compare>(__first, __last, __comp, __n, __first + __start);
+ _VSTD::__sift_down<_Compare>(__first, __comp, __n, __first + __start);
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116382.396554.patch
Type: text/x-patch
Size: 3122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211229/37f6aa62/attachment-0001.bin>
More information about the libcxx-commits
mailing list