From 76badf37b88c23081db72c206445d5f0bf4e28a4 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 26 Jun 2024 09:38:36 +0200 Subject: Pass ServeApi to just-mr maps by raw pointer ...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary. --- src/other_tools/ops_maps/content_cas_map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/other_tools/ops_maps/content_cas_map.cpp') diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp index 4e526bc7..651e83fb 100644 --- a/src/other_tools/ops_maps/content_cas_map.cpp +++ b/src/other_tools/ops_maps/content_cas_map.cpp @@ -108,7 +108,7 @@ auto CreateContentCASMap( MirrorsPtr const& additional_mirrors, CAInfoPtr const& ca_info, gsl::not_null const& critical_git_op_map, - std::optional const& serve, + ServeApi const* serve, gsl::not_null const& local_api, IExecutionApi const* remote_api, std::size_t jobs) -> ContentCASMap { @@ -116,7 +116,7 @@ auto CreateContentCASMap( additional_mirrors, ca_info, critical_git_op_map, - &serve, + serve, local_api, remote_api](auto ts, auto setter, @@ -149,7 +149,7 @@ auto CreateContentCASMap( just_mr_paths, additional_mirrors, ca_info, - &serve, + serve, local_api, remote_api, setter, @@ -215,7 +215,7 @@ auto CreateContentCASMap( return; } // check if content is known to remote serve service - if (serve and remote_api != nullptr and + if (serve != nullptr and remote_api != nullptr and serve->ContentInRemoteCAS(key.content)) { // try to get content from remote CAS if (remote_api->RetrieveToCas( -- cgit v1.2.3