From 4625d391cad4d04f9adca4484da687b2adb1fed6 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 25 Jun 2024 16:14:51 +0200 Subject: Use a raw pointer for passing optional IExecutionApi ...instead of std::optional> --- src/other_tools/root_maps/root_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/other_tools/root_maps/root_utils.cpp') 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()), -- cgit v1.2.3