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

@@ -196,6 +196,8 @@ public:
/// Are no bits set?
bool none() const {
// cppcheck-suppress useStlAlgorithm
// XXX maybe do this one..
for (const auto &e : bits) {
if (e != 0) {
return false;

View File

@@ -616,12 +616,14 @@ public:
vertex_descriptor v) const {
if (in_degree_impl(v) < out_degree_impl(u)) {
for (const edge_descriptor &e : in_edges_range(v, *this)) {
// cppcheck-suppress useStlAlgorithm
if (source_impl(e) == u) {
return {e, true};
}
}
} else {
for (const edge_descriptor &e : out_edges_range(u, *this)) {
// cppcheck-suppress useStlAlgorithm
if (target_impl(e) == v) {
return {e, true};
}

View File

@@ -134,6 +134,7 @@ string dumpString(const ue2_literal &lit) {
void upperString(string &s) {
for (auto &c : s) {
// cppcheck-suppress useStlAlgorithm
c = mytoupper(c);
}
}
@@ -341,6 +342,7 @@ void make_nocase(ue2_literal *lit) {
ue2_literal rv;
for (const auto &elem: *lit) {
// cppcheck-suppress useStlAlgorithm
rv.push_back(elem.c, ourisalpha(elem.c));
}