summaryrefslogtreecommitdiff
path: root/test/utils/container_matchers.hpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-03-23 18:47:42 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2022-03-23 20:07:51 +0100
commit7a05bb5cfbf3560b828c226f4a3bad8c3826b039 (patch)
treeed77169173b89492869c787533f27d0bfb95480f /test/utils/container_matchers.hpp
parent45cba2778426601bdffbcfe6aa7310aee76a6e54 (diff)
downloadjustbuild-7a05bb5cfbf3560b828c226f4a3bad8c3826b039.tar.gz
Apply changes suggested by clang-tidy 11
Diffstat (limited to 'test/utils/container_matchers.hpp')
-rw-r--r--test/utils/container_matchers.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/utils/container_matchers.hpp b/test/utils/container_matchers.hpp
index c52a7d16..42c0dfb4 100644
--- a/test/utils/container_matchers.hpp
+++ b/test/utils/container_matchers.hpp
@@ -155,12 +155,11 @@ class ContainerUnorderedMatcher : public Catch::MatcherBase<LeftContainer> {
std::iter_swap(it_to_elem, last_to_check);
return true;
};
- for (auto const& element : lhs) {
- if (not check_exists_and_remove(element)) {
- return false;
- }
- }
- return true;
+ return std::all_of(lhs.begin(),
+ lhs.end(),
+ [&check_exists_and_remove](auto const& element) {
+ return check_exists_and_remove(element);
+ });
}
};