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_api/remote/bazel/bytestream_client.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bytestream_client.hpp') diff --git a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp index b8823236..1bd44c42 100644 --- a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp +++ b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp @@ -1,6 +1,7 @@ #ifndef INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BYTESTREAM_CLIENT_HPP #define INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BYTESTREAM_CLIENT_HPP +#include #include #include #include @@ -156,12 +157,11 @@ class ByteStreamClient { std::function const& to_resource_name, std::function const& to_data) const noexcept -> bool { - for (auto const& i : inputs) { - if (not Write(to_resource_name(i), to_data(i))) { - return false; - } - } - return true; + return std::all_of(inputs.begin(), + inputs.end(), + [this, &to_resource_name, &to_data](auto const& i) { + return Write(to_resource_name(i), to_data(i)); + }); } private: -- cgit v1.2.3