From dbac8a19685b83dd1d656201da900a20e11428f2 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 24 Jun 2024 12:20:32 +0200 Subject: Introduce a type allias for an optional ptr to IExecutionApi ...and replace verbose constructions. --- src/other_tools/root_maps/fpath_git_map.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/other_tools/root_maps/fpath_git_map.cpp') diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 43cb0c24..3f941bf5 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -33,14 +33,13 @@ namespace { /// \brief Does the serve endpoint checks and sets the workspace root. /// It guarantees the logger is called exactly once with fatal on failure, and /// the setter on success. -void CheckServeAndSetRoot( - std::string const& tree_id, - std::string const& repo_root, - bool absent, - std::optional const& serve, - std::optional> const& remote_api, - FilePathGitMap::SetterPtr const& ws_setter, - FilePathGitMap::LoggerPtr const& logger) { +void CheckServeAndSetRoot(std::string const& tree_id, + std::string const& repo_root, + bool absent, + std::optional const& serve, + IExecutionApi::OptionalPtr 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 // be able to build against it. If root is not absent, do not fail if we // don't have a suitable remote endpoint, but warn user nonetheless. @@ -102,7 +101,7 @@ void ResolveFilePathTree( gsl::not_null const& critical_git_op_map, gsl::not_null const& resolve_symlinks_map, std::optional const& serve, - std::optional> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, gsl::not_null const& ts, FilePathGitMap::SetterPtr const& ws_setter, FilePathGitMap::LoggerPtr const& logger) { @@ -256,7 +255,7 @@ auto CreateFilePathGitMap( gsl::not_null const& import_to_git_map, gsl::not_null const& resolve_symlinks_map, std::optional const& serve, - std::optional> const& remote_api, + IExecutionApi::OptionalPtr const& remote_api, std::size_t jobs, std::string multi_repo_tool_name, std::string build_tool_name) -> FilePathGitMap { -- cgit v1.2.3