Minor optimization of stable_sort

This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:24 +02:00
1 parent 586d0ae13a
commit 22ccae74c3
1 file changed
+6 -8
+6 -8
View File
@@ -891,10 +891,9 @@
dest++; \
el1++; \
if (M_UNLIKELY(-- n1 == 0)) { \
if (n2 > 0) { \
memcpy (dest, el2, n2 * sizeof (type)); \
dest += n2; \
} \
M_ASSERT (n2 > 0); \
memcpy (dest, el2, n2 * sizeof (type)); \
dest += n2; \
break; \
} \
} else { \
@@ -902,10 +901,9 @@
dest++; \
el2++; \
if (M_UNLIKELY(-- n2 == 0)) { \
if (n1 > 0) { \
memcpy (dest, el1, n1 * sizeof (type)); \
dest += n1; \
} \
M_ASSERT (n1 > 0); \
memcpy (dest, el1, n1 * sizeof (type)); \
dest += n1; \
break; \
} \
} \