MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / sort

Method sort

StereoKitC/libraries/array.h:218–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 // Sort methods
217
218 void sort (int32_t (*compare)(const T&a, const T&b)) { qsort(data, count, sizeof(T), (int (*)(void const*, void const*))compare); }
219 void sort () { qsort(data, count, sizeof(T), [](const void *a, const void *b) {T fa = *(T*)a, fb = *(T*)b; return (int32_t)((fa > fb) - (fa < fb));}); }
220 void sort_desc() { qsort(data, count, sizeof(T), [](const void *a, const void *b) {T fa = *(T*)a, fb = *(T*)b; return (int32_t)((fa < fb) - (fa > fb));}); }
221

Callers 2

file_picker_open_folderFunction · 0.80
file_picker_updateFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected