Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/dictBuilder/cover.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) {
}

/**
* Same as COVER_cmp() except ties are broken by pointer value
* Same as COVER_cmp() except ties are broken by the position each element holds
*/
#if (ZDICT_QSORT == ZDICT_QSORT_MSVC) || (ZDICT_QSORT == ZDICT_QSORT_APPLE)
static int WIN_CDECL COVER_strict_cmp(void* g_coverCtx, const void* lp, const void* rp) {
Expand All @@ -321,7 +321,7 @@ static int COVER_strict_cmp(const void *lp, const void *rp) {
#endif
int result = COVER_cmp((COVER_ctx_t*)g_coverCtx, lp, rp);
if (result == 0) {
result = lp < rp ? -1 : 1;
result = *(const U32 *)lp < *(const U32 *)rp ? -1 : 1;
}
return result;
}
Expand All @@ -337,7 +337,7 @@ static int COVER_strict_cmp8(const void *lp, const void *rp) {
#endif
int result = COVER_cmp8((COVER_ctx_t*)g_coverCtx, lp, rp);
if (result == 0) {
result = lp < rp ? -1 : 1;
result = *(const U32 *)lp < *(const U32 *)rp ? -1 : 1;
}
return result;
}
Expand Down Expand Up @@ -692,7 +692,7 @@ static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
{
/* suffix is a partial suffix array.
* It only sorts suffixes by their first parameters.d bytes.
* The sort is stable, so each dmer group is sorted by position in input.
* Ties are broken by position, so each group is sorted by input position.
*/
U32 i;
for (i = 0; i < ctx->suffixSize; ++i) {
Expand Down
Loading