Skip to content

Commit

Permalink
Simplify: Iterating zero times gives same result
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelm committed Oct 3, 2024
1 parent 3b8c129 commit 99a49af
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/randstrobes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ Randstrobe RandstrobeIterator::get(unsigned int strobe1_index) const {
uint64_t min_val = std::numeric_limits<uint64_t>::max();
Syncmer strobe2 = strobe1;

if (syncmers.size() < w_start) {
return make_randstrobe(strobe1, strobe1, aux_len);
}

for (auto i = w_start; i <= w_end && syncmers[i].position <= max_position; i++) {
assert(i < syncmers.size());

Expand Down Expand Up @@ -201,12 +197,6 @@ Randstrobe RandstrobeGenerator::next() {
return RandstrobeGenerator::end();
}
auto strobe1 = syncmers[0];

if (syncmers.size() < w_min) {
auto randstrobe = make_randstrobe(strobe1, strobe1, aux_len);
syncmers.pop_front();
return randstrobe;
}
auto max_position = strobe1.position + max_dist;
uint64_t min_val = std::numeric_limits<uint64_t>::max();
Syncmer strobe2 = strobe1; // Default if no nearby syncmer
Expand Down

0 comments on commit 99a49af

Please sign in to comment.