FastLED 3.10.8
Loading...
Searching...
No Matches

◆ qsort_swap()

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

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

369 {
370 if (a == b) return;
371 constexpr size_t STACK_BUF_SIZE = 64;
372 if (size <= STACK_BUF_SIZE) {
373 char tmp[STACK_BUF_SIZE];
374 memcpy(tmp, a, size);
375 memcpy(a, b, size);
376 memcpy(b, tmp, size);
377 } else {
378 for (size_t i = 0; i < size; ++i) {
379 char t = a[i];
380 a[i] = b[i];
381 b[i] = t;
382 }
383 }
384}
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
Definition cstring.h:136

References fl::FL_NO_EXCEPT, 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: