summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bytestream_client.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 /src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
parent45cba2778426601bdffbcfe6aa7310aee76a6e54 (diff)
downloadjustbuild-7a05bb5cfbf3560b828c226f4a3bad8c3826b039.tar.gz
Apply changes suggested by clang-tidy 11
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bytestream_client.hpp')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bytestream_client.hpp12
1 files changed, 6 insertions, 6 deletions
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 <algorithm>
#include <functional>
#include <iomanip>
#include <optional>
@@ -156,12 +157,11 @@ class ByteStreamClient {
std::function<std::string(T_Input const&)> const& to_resource_name,
std::function<std::string(T_Input const&)> 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: