From dd923f7abd3ad2fd2e8feabd411bb8475d7c6f1e Mon Sep 17 00:00:00 2001 From: Marcel Martin Date: Wed, 5 Jun 2024 14:29:45 +0200 Subject: [PATCH] Simplify: Iterating zero times gives same result --- src/randstrobes.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/randstrobes.cpp b/src/randstrobes.cpp index 9b59a9ef..c77ec7a3 100644 --- a/src/randstrobes.cpp +++ b/src/randstrobes.cpp @@ -180,10 +180,6 @@ Randstrobe RandstrobeIterator::get(unsigned int strobe1_index) const { uint64_t min_val = std::numeric_limits::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()); @@ -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::max(); Syncmer strobe2 = strobe1; // Default if no nearby syncmer