From 7a05bb5cfbf3560b828c226f4a3bad8c3826b039 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Wed, 23 Mar 2022 18:47:42 +0100 Subject: Apply changes suggested by clang-tidy 11 --- .../execution_engine/executor/executor.test.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'test/buildtool/execution_engine/executor/executor.test.cpp') diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 63f41521..beec0842 100755 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -130,16 +130,13 @@ class TestApi : public IExecutionApi { } auto Upload(BlobContainer const& blobs, bool /*unused*/) noexcept -> bool final { - for (auto const& blob : blobs) { - if (config_.artifacts[blob.data].uploads) { - continue; // for local artifacts - } - if (config_.artifacts[blob.digest.hash()].uploads) { - continue; // for known and action artifacts - } - return false; - } - return true; + return std::all_of( + blobs.begin(), blobs.end(), [this](auto const& blob) { + return config_.artifacts[blob.data] + .uploads // for local artifacts + or config_.artifacts[blob.digest.hash()] + .uploads; // for known and action artifacts + }); } auto UploadTree( std::vector< -- cgit v1.2.3