ck_hp: Branch-free compare (contributed by Degski).

ck_pring
Samy Al Bahra 13 years ago
parent 5889498c16
commit f069d081be

@ -154,14 +154,7 @@ hazard_compare(const void *a, const void *b)
x = a;
y = b;
if (*x < *y) {
return -1;
} else if (*x == *y) {
return 0;
}
return 1;
return ((*x > *y) - (*x < *y));
}
CK_CC_INLINE static bool

Loading…
Cancel
Save