undo that one, it breaks

This commit is contained in:
G.E 2024-05-20 16:35:58 +03:00
parent fa358535be
commit 7a5f271abe

View File

@ -135,10 +135,10 @@ void FDRCompiler::createInitialState(FDR *fdr) {
// Find the minimum length for the literals in this bucket. // Find the minimum length for the literals in this bucket.
const vector<LiteralIndex> &bucket_lits = bucketToLits[b]; const vector<LiteralIndex> &bucket_lits = bucketToLits[b];
u32 min_len = ~0U; u32 min_len = ~0U;
auto mlit = [lits=lits](const LiteralIndex &m, const LiteralIndex &n) { for (const LiteralIndex &lit_idx : bucket_lits) {
return verify_u32(lits[m].s.length()) < verify_u32(lits[n].s.length()); }; // cppcheck-suppress useStlAlgorithm
auto minel = std::min_element(bucket_lits.begin(), bucket_lits.end(), mlit); min_len = min(min_len, verify_u32(lits[lit_idx].s.length()));
min_len = min(min_len, verify_u32(lits[*minel].s.length())); }
DEBUG_PRINTF("bucket %u has min_len=%u\n", b, min_len); DEBUG_PRINTF("bucket %u has min_len=%u\n", b, min_len);
assert(min_len); assert(min_len);