Skip to content

Commit

Permalink
static_cast in operator uint64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
adamant-pwn committed Feb 7, 2024
1 parent ff5a848 commit a395b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/kmer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct uint_kmer_t {
uint_kmer_t() {}
uint_kmer_t(uint64_t kmer) : kmer(kmer) {}

explicit operator uint64_t() const { return kmer; }
explicit operator uint64_t() const { return static_cast<uint64_t>(kmer); }

// TODO: change to <=> when switching to C++20
bool operator==(uint_kmer_t const& t) const { return kmer == t.kmer; }
Expand Down Expand Up @@ -142,6 +142,6 @@ struct dna_uint_kmer_t : alpha_kmer_t<Kmer, 2, dna_alphabet> {
};

// also consider __uint128_t, bitpack<__uint128_t, 1>
using default_kmer_t = dna_uint_kmer_t<uint64_t>;
using default_kmer_t = dna_uint_kmer_t<bitpack<__uint128_t, 1>>;

} // namespace sshash

0 comments on commit a395b94

Please sign in to comment.