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 9, 2024
1 parent cf80ad5 commit dd923f7
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 @@ -180,10 +180,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 @@ -212,12 +208,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 dd923f7

Please sign in to comment.