src/cx/list.h

changeset 1239
b4b1f15d1866
parent 1201
84fc692d2708
--- a/src/cx/list.h	Wed Mar 05 20:53:41 2025 +0100
+++ b/src/cx/list.h	Thu Mar 06 20:28:34 2025 +0100
@@ -894,6 +894,7 @@
  */
 cx_attr_nonnull
 static inline void cxListSort(CxList *list) {
+    if (list->collection.sorted) return;
     list->cl->sort(list);
     list->collection.sorted = true;
 }

mercurial