From f1b92cf45f0ea07f22965ab6d9bca5fcd97e03a8 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 20 Jun 2024 16:30:38 +0200 Subject: Pass IExecutionApi to IExecutionApi by reference ...instead of not_null const ptr. --- src/buildtool/serve_api/remote/target_client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buildtool/serve_api/remote/target_client.cpp') diff --git a/src/buildtool/serve_api/remote/target_client.cpp b/src/buildtool/serve_api/remote/target_client.cpp index c8a7fc94..7b13b90e 100644 --- a/src/buildtool/serve_api/remote/target_client.cpp +++ b/src/buildtool/serve_api/remote/target_client.cpp @@ -38,7 +38,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, const std::string& repo_key) const noexcept -> std::optional { // make sure the blob containing the key is in the remote cas - if (!apis_.local->RetrieveToCas({key.Id()}, &*apis_.remote)) { + if (!apis_.local->RetrieveToCas({key.Id()}, *apis_.remote)) { return serve_target_result_t{ std::in_place_index<1>, fmt::format("Failed to retrieve to remote cas ObjectInfo {}", @@ -48,7 +48,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, if (!apis_.local->RetrieveToCas( {Artifact::ObjectInfo{.digest = ArtifactDigest{repo_key, 0, false}, .type = ObjectType::File}}, - &*apis_.remote)) { + *apis_.remote)) { return serve_target_result_t{ std::in_place_index<1>, fmt::format("Failed to retrieve to remote cas blob {}", repo_key)}; @@ -94,7 +94,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, } auto const& dispatch_info = Artifact::ObjectInfo{ .digest = ArtifactDigest{*dispatch_dgst}, .type = ObjectType::File}; - if (!apis_.local->RetrieveToCas({dispatch_info}, &*apis_.remote)) { + if (!apis_.local->RetrieveToCas({dispatch_info}, *apis_.remote)) { return serve_target_result_t{ std::in_place_index<1>, fmt::format("Failed to upload blob {} to remote cas", @@ -127,7 +127,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, auto const& obj_info = Artifact::ObjectInfo{ .digest = target_value_dgst, .type = ObjectType::File}; if (!apis_.local->IsAvailable(target_value_dgst)) { - if (!apis_.remote->RetrieveToCas({obj_info}, &*apis_.local)) { + if (!apis_.remote->RetrieveToCas({obj_info}, *apis_.local)) { return serve_target_result_t{ std::in_place_index<1>, fmt::format( -- cgit v1.2.3