diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-24 12:20:32 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-25 13:59:48 +0200 |
commit | dbac8a19685b83dd1d656201da900a20e11428f2 (patch) | |
tree | 311ecff8b9498f3753d2df83b95d7301f11d90d8 /src/buildtool/execution_api/remote/bazel | |
parent | f77492425703122c9b977ba3e0f9f5fdd80a08d1 (diff) | |
download | justbuild-dbac8a19685b83dd1d656201da900a20e11428f2.tar.gz |
Introduce a type allias for an optional ptr to IExecutionApi
...and replace verbose constructions.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 3 | ||||
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.hpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index b475dfe8..f636c265 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -221,8 +221,7 @@ auto BazelApi::CreateAction( [[nodiscard]] auto BazelApi::RetrieveToPaths( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<std::filesystem::path> const& output_paths, - std::optional<gsl::not_null<const IExecutionApi*>> const& alternative) - const noexcept -> bool { + IExecutionApi::OptionalPtr const& alternative) const noexcept -> bool { if (artifacts_info.size() != output_paths.size()) { Logger::Log(LogLevel::Warning, "different number of digests and output paths."); diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp index a9149450..e5669933 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp @@ -62,7 +62,7 @@ class BazelApi final : public IExecutionApi { [[nodiscard]] auto RetrieveToPaths( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<std::filesystem::path> const& output_paths, - std::optional<gsl::not_null<const IExecutionApi*>> const& alternative = + IExecutionApi::OptionalPtr const& alternative = std::nullopt) const noexcept -> bool final; [[nodiscard]] auto RetrieveToFds( |