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_api/remote/bazel/bytestream_client.hpp | |
parent | 45cba2778426601bdffbcfe6aa7310aee76a6e54 (diff) | |
download | justbuild-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.hpp | 12 |
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: |