mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-12-31 13:49:07 +03:00
first batch of cppcheck disables and a few more stl-ifications,
involving use of accumulate() .
This commit is contained in:
@@ -136,6 +136,7 @@ void FDRCompiler::createInitialState(FDR *fdr) {
|
||||
const vector<LiteralIndex> &bucket_lits = bucketToLits[b];
|
||||
u32 min_len = ~0U;
|
||||
for (const LiteralIndex &lit_idx : bucket_lits) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
min_len = min(min_len, verify_u32(lits[lit_idx].s.length()));
|
||||
}
|
||||
|
||||
|
||||
@@ -303,6 +303,7 @@ setupFullConfs(const vector<hwlmLiteral> &lits,
|
||||
if (contains(bucketToLits, b)) {
|
||||
vector<hwlmLiteral> vl;
|
||||
for (const LiteralIndex &lit_idx : bucketToLits.at(b)) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
vl.emplace_back(lits[lit_idx]);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ void getTeddyDescriptions(vector<TeddyEngineDescription> *out) {
|
||||
};
|
||||
out->clear();
|
||||
for (const auto &def : defns) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
out->emplace_back(def);
|
||||
}
|
||||
}
|
||||
@@ -123,6 +124,7 @@ bool isAllowed(const vector<hwlmLiteral> &vl, const TeddyEngineDescription &eng,
|
||||
u32 n_small_lits = 0;
|
||||
for (const auto &lit : vl) {
|
||||
if (lit.s.length() < eng.numMasks) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
n_small_lits++;
|
||||
}
|
||||
}
|
||||
@@ -204,6 +206,7 @@ unique_ptr<TeddyEngineDescription> getTeddyDescription(u32 engineID) {
|
||||
getTeddyDescriptions(&descs);
|
||||
|
||||
for (const auto &desc : descs) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
if (desc.getID() == engineID) {
|
||||
return std::make_unique<TeddyEngineDescription>(desc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user