diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-23 18:47:42 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-23 20:07:51 +0100 |
commit | 7a05bb5cfbf3560b828c226f4a3bad8c3826b039 (patch) | |
tree | ed77169173b89492869c787533f27d0bfb95480f /src/buildtool/execution_engine/dag/dag.cpp | |
parent | 45cba2778426601bdffbcfe6aa7310aee76a6e54 (diff) | |
download | justbuild-7a05bb5cfbf3560b828c226f4a3bad8c3826b039.tar.gz |
Apply changes suggested by clang-tidy 11
Diffstat (limited to 'src/buildtool/execution_engine/dag/dag.cpp')
-rw-r--r-- | src/buildtool/execution_engine/dag/dag.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/buildtool/execution_engine/dag/dag.cpp b/src/buildtool/execution_engine/dag/dag.cpp index 5d60dd01..6eb492a8 100644 --- a/src/buildtool/execution_engine/dag/dag.cpp +++ b/src/buildtool/execution_engine/dag/dag.cpp @@ -96,22 +96,18 @@ auto DependencyGraph::LinkNodePointers( auto DependencyGraph::Add(std::vector<ActionDescription> const& actions) -> bool { - for (auto const& action : actions) { - if (not AddAction(action)) { - return false; - } - } - return true; + return std::all_of( + actions.begin(), actions.end(), [this](auto const& action) { + return AddAction(action); + }); } auto DependencyGraph::Add(std::vector<ActionDescription::Ptr> const& actions) -> bool { - for (auto const& action : actions) { - if (not AddAction(*action)) { - return false; - } - } - return true; + return std::all_of( + actions.begin(), actions.end(), [this](auto const& action) { + return AddAction(*action); + }); } auto DependencyGraph::AddArtifact(ArtifactDescription const& description) |