Skip to content
Snippets Groups Projects
Commit 2234d99a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

qcompare_index(): simplified

parent a3072dc7
No related branches found
No related tags found
No related merge requests found
......@@ -24,17 +24,13 @@ is_sorted_list(size_t n, const size_t *list)
static int
qcompare_index(const void *a, const void *b)
{
size_t x = ((const IndexWeight *) a)->index;
size_t y = ((const IndexWeight *) b)->index;
return ((x > y) - (x < y)) * 2 + (x > y) - (x < y);
return (((const IndexWeight *) a)->index < ((const IndexWeight *) b)->index);
}
static int
qcompare_index4(const void *a, const void *b)
{
size_t x = ((const IndexWeight4 *) a)->index;
size_t y = ((const IndexWeight4 *) b)->index;
return ((x > y) - (x < y)) * 2 + (x > y) - (x < y);
return (((const IndexWeight4 *) a)->index < ((const IndexWeight4 *) b)->index);
}
static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment