Skip to content

Commit

Permalink
Use 0xFF instead of -1 for the unique mask
Browse files Browse the repository at this point in the history
`char` type is unsigned on aarch64, so negative values cannot be used
  • Loading branch information
martin-g authored Apr 4, 2024
1 parent 6bbf2c5 commit c9e4223
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/kmer_index/extension_index/inout_mask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class InOutMask {
return unique[mask];
}

static constexpr int8_t GetUnique(uint8_t mask) {
constexpr int8_t next[] =
{ -1, 0, 1, -1, 2, -1, -1, -1,
3, -1, -1, -1, -1, -1, -1, -1 };
static constexpr char GetUnique(uint8_t mask) {
constexpr char next[] =
{ UINT8_C(0xFF), 0, 1, UINT8_C(0xFF), 2, UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF),
3, UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF), UINT8_C(0xFF) };
return next[mask];
}

Expand Down

0 comments on commit c9e4223

Please sign in to comment.