We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81b0063 commit b432b85Copy full SHA for b432b85
dna_four_bit.hpp
@@ -127,9 +127,10 @@ struct genome_four_bit_itr {
127
}
128
genome_four_bit_itr operator+(const size_t step) const {
129
// whether the sum of offsets is >= 16
130
- const bool shift_one_pos = (offset + (step & 15ul) >= 16);
+ const bool shift_one_pos =
131
+ (((offset + (static_cast<int>(step) & 15)) & 16) >> 4);
132
- const size_t new_offset = (offset + step) & 15ul;
133
+ const int new_offset = (offset + step) & 15;
134
return genome_four_bit_itr(itr + step/16 + shift_one_pos,
135
new_offset);
136
0 commit comments