mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
switch to std::sort until I have time to sort this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f41ad3bc9
commit
de5debfb58
@ -246,12 +246,16 @@ static inline int array_pod_sort_comparator(const void *P1, const void *P2) {
|
||||
///
|
||||
/// NOTE: If qsort_r were portable, we could allow a custom comparator and
|
||||
/// default to std::less.
|
||||
#include <algorithm>
|
||||
|
||||
template<class IteratorTy>
|
||||
static inline void array_pod_sort(IteratorTy Start, IteratorTy End) {
|
||||
std::sort(Start, End);
|
||||
|
||||
// Don't dereference start iterator of empty sequence.
|
||||
if (Start == End) return;
|
||||
qsort(&*Start, End-Start, sizeof(*Start),
|
||||
array_pod_sort_comparator<sizeof(*Start)>);
|
||||
//if (Start == End) return;
|
||||
//qsort(&*Start, End-Start, sizeof(*Start),
|
||||
// array_pod_sort_comparator<*Start>);
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user