diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-25 16:14:51 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-27 11:24:20 +0200 |
commit | 4625d391cad4d04f9adca4484da687b2adb1fed6 (patch) | |
tree | 4f4a3e19e78324e6abe3a6ac1209cad3d8a50cb0 /src/other_tools/root_maps/fpath_git_map.cpp | |
parent | 70a854c2ce90194a943b6e007a1515dfc87314eb (diff) | |
download | justbuild-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/fpath_git_map.cpp')
-rw-r--r-- | src/other_tools/root_maps/fpath_git_map.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 3f941bf5..2c918133 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -37,7 +37,7 @@ void CheckServeAndSetRoot(std::string const& tree_id, std::string const& repo_root, bool absent, std::optional<ServeApi> const& serve, - IExecutionApi::OptionalPtr const& remote_api, + IExecutionApi const* remote_api, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { // if serve endpoint is given, try to ensure it has this tree available to @@ -50,7 +50,7 @@ void CheckServeAndSetRoot(std::string const& tree_id, } if (not *has_tree) { // only enforce root setup on the serve endpoint if root is absent - if (not remote_api) { + if (remote_api == nullptr) { (*logger)( fmt::format("Missing or incompatible remote-execution " "endpoint needed to sync workspace root {} " @@ -65,7 +65,7 @@ void CheckServeAndSetRoot(std::string const& tree_id, if (not EnsureAbsentRootOnServe(*serve, tree_id, repo_root, - &(*remote_api.value()), + remote_api, logger, /*no_sync_is_fatal=*/absent)) { return; // fatal @@ -101,7 +101,7 @@ void ResolveFilePathTree( gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, std::optional<ServeApi> const& serve, - IExecutionApi::OptionalPtr const& remote_api, + IExecutionApi const* remote_api, gsl::not_null<TaskSystem*> const& ts, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { @@ -255,7 +255,7 @@ auto CreateFilePathGitMap( gsl::not_null<ImportToGitMap*> const& import_to_git_map, gsl::not_null<ResolveSymlinksMap*> const& resolve_symlinks_map, std::optional<ServeApi> const& serve, - IExecutionApi::OptionalPtr const& remote_api, + IExecutionApi const* remote_api, std::size_t jobs, std::string multi_repo_tool_name, std::string build_tool_name) -> FilePathGitMap { |