summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/content_cas_map.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-26 09:38:36 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-27 11:24:20 +0200
commit76badf37b88c23081db72c206445d5f0bf4e28a4 (patch)
tree2376106b12c7664f80d9195e41371d3d31d0988d /src/other_tools/ops_maps/content_cas_map.cpp
parent915d3f2b0119f8bd31d026e686dbaf9124186e61 (diff)
downloadjustbuild-76badf37b88c23081db72c206445d5f0bf4e28a4.tar.gz
Pass ServeApi to just-mr maps by raw pointer
...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary.
Diffstat (limited to 'src/other_tools/ops_maps/content_cas_map.cpp')
-rw-r--r--src/other_tools/ops_maps/content_cas_map.cpp8
1 files changed, 4 insertions, 4 deletions
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<CriticalGitOpMap*> const& critical_git_op_map,
- std::optional<ServeApi> const& serve,
+ ServeApi const* serve,
gsl::not_null<IExecutionApi const*> 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(