mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
stl'ed another.
This commit is contained in:
parent
97a8519084
commit
fa358535be
@ -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;
|
||||||
for (const LiteralIndex &lit_idx : bucket_lits) {
|
auto mlit = [lits=lits](const LiteralIndex &m, const LiteralIndex &n) {
|
||||||
// cppcheck-suppress useStlAlgorithm
|
return verify_u32(lits[m].s.length()) < verify_u32(lits[n].s.length()); };
|
||||||
min_len = min(min_len, verify_u32(lits[lit_idx].s.length()));
|
auto minel = std::min_element(bucket_lits.begin(), bucket_lits.end(), mlit);
|
||||||
}
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user