mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Remove unused bubble sort (finally)
This commit is contained in:
parent
7546ee715f
commit
e4bec352d9
|
@ -76,36 +76,6 @@ R find_binary(R range, T value)
|
|||
return R();
|
||||
}
|
||||
|
||||
template<class R>
|
||||
void sort_bubble(R range)
|
||||
{
|
||||
concept_empty::check(range);
|
||||
concept_forwarditeration::check(range);
|
||||
concept_backwarditeration::check(range);
|
||||
|
||||
// slow bubblesort :/
|
||||
for(; !range.empty(); range.pop_back())
|
||||
{
|
||||
R section = range;
|
||||
typename R::type *prev = §ion.front();
|
||||
section.pop_front();
|
||||
for(; !section.empty(); section.pop_front())
|
||||
{
|
||||
typename R::type *cur = §ion.front();
|
||||
if(*cur < *prev)
|
||||
swap(*cur, *prev);
|
||||
prev = cur;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
template<class R>
|
||||
void sort_quick(R range)
|
||||
{
|
||||
concept_index::check(range);
|
||||
}*/
|
||||
|
||||
template<class R>
|
||||
void sort(R range)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue