Skip to content

Commit c7357c4

Browse files
authored
Remove unnecessary if statement in bubble sort
1 parent 4c15e77 commit c7357c4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

include/sorting_algorithms/sort.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ namespace detail {
3838
template <class ForwardIterator, class Compare>
3939
inline void
4040
bubble_sort_impl(ForwardIterator first, ForwardIterator last, Compare compare, std::forward_iterator_tag) noexcept {
41-
if (first == last) {
42-
return;
43-
}
44-
4541
ForwardIterator current, next;
4642
for (; first != last; last = current) {
4743
current = next = first;

0 commit comments

Comments
 (0)