summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/root_utils.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-25 16:14:51 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-27 11:24:20 +0200
commit4625d391cad4d04f9adca4484da687b2adb1fed6 (patch)
tree4f4a3e19e78324e6abe3a6ac1209cad3d8a50cb0 /src/other_tools/root_maps/root_utils.cpp
parent70a854c2ce90194a943b6e007a1515dfc87314eb (diff)
downloadjustbuild-4625d391cad4d04f9adca4484da687b2adb1fed6.tar.gz
Use a raw pointer for passing optional IExecutionApi
...instead of std::optional<gsl::not_null<IExecutionApi const*>>
Diffstat (limited to 'src/other_tools/root_maps/root_utils.cpp')
-rw-r--r--src/other_tools/root_maps/root_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/other_tools/root_maps/root_utils.cpp b/src/other_tools/root_maps/root_utils.cpp
index 1b9de917..6e77cae8 100644
--- a/src/other_tools/root_maps/root_utils.cpp
+++ b/src/other_tools/root_maps/root_utils.cpp
@@ -38,10 +38,10 @@ auto CheckServeHasAbsentRoot(ServeApi const& serve,
auto EnsureAbsentRootOnServe(ServeApi const& serve,
std::string const& tree_id,
std::filesystem::path const& repo_path,
- IExecutionApi::OptionalPtr const& remote_api,
+ IExecutionApi const* remote_api,
AsyncMapConsumerLoggerPtr const& logger,
bool no_sync_is_fatal) -> bool {
- if (remote_api) {
+ if (remote_api != nullptr) {
// upload tree to remote CAS
auto repo = RepositoryConfig{};
if (not repo.SetGitCAS(repo_path)) {
@@ -55,7 +55,7 @@ auto EnsureAbsentRootOnServe(ServeApi const& serve,
{Artifact::ObjectInfo{
.digest = ArtifactDigest{tree_id, 0, /*is_tree=*/true},
.type = ObjectType::Tree}},
- **remote_api)) {
+ *remote_api)) {
(*logger)(fmt::format("Failed to sync tree {} from repository {}",
tree_id,
repo_path.string()),