Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-mahe committed Jan 2, 2025
1 parent 0b6b465 commit 09f5e30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/derep_prefix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ auto derep_compare_prefix(const void * a, const void * b) -> int
return -1;
}

// both are deleted, compare abundances
if (lhs->size < rhs->size)
{
return +1;
Expand All @@ -109,13 +110,15 @@ auto derep_compare_prefix(const void * a, const void * b) -> int
return -1;
}

// both are deleted, same abundances, compare sequence headers
auto const result = std::strcmp(db_getheader(lhs->seqno_first),
db_getheader(rhs->seqno_first));
if (result != 0)
{
return result;
}

// both are deleted, same abundances, same sequence headers, compare input order
if (lhs->seqno_first < rhs->seqno_first)
{
return -1;
Expand Down

0 comments on commit 09f5e30

Please sign in to comment.