Try to fix 'make checkcfg'
This commit is contained in:
parent
b90a17f64f
commit
12319d705e
|
@ -3165,6 +3165,9 @@ void nullPointer_wmemcmp(wchar_t *p)
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
#define pred [](int i){return i==0;}
|
||||||
|
|
||||||
|
|
||||||
// <!-- InputIterator std::find(InputIterator first, InputIterator last, T val) -->
|
// <!-- InputIterator std::find(InputIterator first, InputIterator last, T val) -->
|
||||||
// <!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
// <!-- InputIterator std::find_if(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||||
// <!-- InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
// <!-- InputIterator std::find_if_not(InputIterator first, InputIterator last, UnaryPredicate val) -->
|
||||||
|
@ -3178,23 +3181,21 @@ void stdfind(const std::list<int> &ints1, const std::list<int> &ints2)
|
||||||
|
|
||||||
// cppcheck-suppress mismatchingContainers
|
// cppcheck-suppress mismatchingContainers
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
std::find_if(ints1.begin(), ints2.end(), [](int i){return i!=0;});
|
std::find_if(ints1.begin(), ints2.end(), pred);
|
||||||
// cppcheck-suppress mismatchingContainers
|
// cppcheck-suppress mismatchingContainers
|
||||||
if (std::find_if(ints1.begin(), ints1.end(), [](int i){return i!=0;}) == ints2.end()) {}
|
if (std::find_if(ints1.begin(), ints1.end(), pred) == ints2.end()) {}
|
||||||
|
|
||||||
// cppcheck-suppress mismatchingContainers
|
// cppcheck-suppress mismatchingContainers
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
std::find_if_not(ints1.begin(), ints2.end(), [](int i){return i!=0;});
|
std::find_if_not(ints1.begin(), ints2.end(), pred);
|
||||||
// cppcheck-suppress mismatchingContainers
|
// cppcheck-suppress mismatchingContainers
|
||||||
if (std::find_if_not(ints1.begin(), ints1.end(), [](int i){return i!=0;}) == ints2.end()) {}
|
if (std::find_if_not(ints1.begin(), ints1.end(), pred) == ints2.end()) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// <!-- bool std::all_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
// <!-- bool std::all_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
||||||
// <!-- bool std::any_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
// <!-- bool std::any_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
||||||
// <!-- bool std::none_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
// <!-- bool std::none_of(InputIterator first, InputIterator last, UnaryPredicate pred) -->
|
||||||
void stdallof(const std::list<int> &ints1, const std::list<int> &ints2) {
|
void stdallof(const std::list<int> &ints1, const std::list<int> &ints2) {
|
||||||
bool pred(int);
|
|
||||||
|
|
||||||
// cppcheck-suppress mismatchingContainers
|
// cppcheck-suppress mismatchingContainers
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
std::all_of(ints1.begin(), ints2.end(), pred);
|
std::all_of(ints1.begin(), ints2.end(), pred);
|
||||||
|
|
Loading…
Reference in New Issue