FastLED 3.9.15
Loading...
Searching...
No Matches

◆ qsort_swap()

void fl::detail::qsort_swap ( char * a,
char * b,
size_t size )

Definition at line 330 of file cstdlib.cpp.hpp.

330 {
331 if (a == b) return;
332 constexpr size_t STACK_BUF_SIZE = 64;
333 if (size <= STACK_BUF_SIZE) {
334 char tmp[STACK_BUF_SIZE];
335 memcpy(tmp, a, size);
336 memcpy(a, b, size);
337 memcpy(b, tmp, size);
338 } else {
339 for (size_t i = 0; i < size; ++i) {
340 char t = a[i];
341 a[i] = b[i];
342 b[i] = t;
343 }
344 }
345}
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT

References fl::memcpy(), and fl::t.

Referenced by fl::qsort_insertion_sort(), and fl::qsort_partition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: