summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/content_git_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-22 18:40:37 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-26 14:51:43 +0100
commit0d3860c4bbfe81c7003f0ea1f1a01fc3a866daed (patch)
treea31eca399b533159f636c194d288716b4abdf7d8 /src/other_tools/root_maps/content_git_map.cpp
parent395c0c8cffc97ae6e29f12715bb5496db121ae01 (diff)
downloadjustbuild-0d3860c4bbfe81c7003f0ea1f1a01fc3a866daed.tar.gz
just-mr async maps: Wrap passed raw pointers
This is to uphold the coding style guide we employ.
Diffstat (limited to 'src/other_tools/root_maps/content_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/content_git_map.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp
index 6f4a08bc..e7361af4 100644
--- a/src/other_tools/root_maps/content_git_map.cpp
+++ b/src/other_tools/root_maps/content_git_map.cpp
@@ -310,8 +310,8 @@ auto CreateContentGitMap(
gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map,
gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map,
bool serve_api_exists,
- IExecutionApi* local_api,
- IExecutionApi* remote_api,
+ gsl::not_null<IExecutionApi*> const& local_api,
+ std::optional<gsl::not_null<IExecutionApi*>> const& remote_api,
bool fetch_absent,
std::size_t jobs) -> ContentGitMap {
auto gitify_content = [content_cas_map,
@@ -656,9 +656,8 @@ auto CreateContentGitMap(
// endpoint
auto root_digest = ArtifactDigest{
*root_tree_id, 0, /*is_tree=*/true};
- if (remote_api != nullptr and
- local_api != nullptr and
- remote_api->RetrieveToCas(
+ if (remote_api and
+ remote_api.value()->RetrieveToCas(
{Artifact::ObjectInfo{
.digest = root_digest,
.type = ObjectType::Tree}},