Merge pull request #283 from isildur-g/wip-cppcheck271-part2

Wip cppcheck271 useStlAlgorithm part2
This commit is contained in:
Konstantinos Margaritis
2024-05-21 15:52:15 +03:00
committed by GitHub
74 changed files with 251 additions and 24 deletions

View File

@@ -60,6 +60,7 @@ unique_ptr<hs_platform_info> xcompileReadMode(const char *s) {
if (!opt.empty()) {
for (const auto &xcompile : xcompile_options) {
// cppcheck-suppress useStlAlgorithm
if (opt == xcompile.name) {
rv.cpu_features = xcompile.cpu_features;
found_mode = true;

View File

@@ -80,11 +80,13 @@ string pathToString(const NGHolder &g, const VertexPath &p) {
/** True if this graph has no non-special successors of start or startDs. */
static
bool graph_is_empty(const NGHolder &g) {
// cppcheck-suppress useStlAlgorithm
for (const auto &v : adjacent_vertices_range(g.start, g)) {
if (!is_special(v, g)) {
return false;
}
}
// cppcheck-suppress useStlAlgorithm
for (const auto &v : adjacent_vertices_range(g.start, g)) {
if (!is_special(v, g)) {
return false;
@@ -468,6 +470,7 @@ void CorpusGeneratorUtf8::generateCorpus(vector<string> &data) {
}
for (const auto &e : raw) {
// cppcheck-suppress useStlAlgorithm
data.push_back(encodeUtf8(e));
}
}
@@ -545,6 +548,7 @@ CorpusGeneratorUtf8::pathToCorpus(const vector<CodePointSet> &path) {
// Generate a corpus from our path
for (const auto &e : path) {
// cppcheck-suppress useStlAlgorithm
s.push_back(getChar(e));
}