From 76badf37b88c23081db72c206445d5f0bf4e28a4 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 26 Jun 2024 09:38:36 +0200 Subject: Pass ServeApi to just-mr maps by raw pointer ...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary. --- src/other_tools/just_mr/setup.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/other_tools/just_mr/setup.cpp') diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp index a383734a..dacbfec6 100644 --- a/src/other_tools/just_mr/setup.cpp +++ b/src/other_tools/just_mr/setup.cpp @@ -164,7 +164,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, common_args.alternative_mirrors, common_args.ca_info, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); @@ -180,7 +180,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, &import_to_git_map, common_args.git_path->string(), *common_args.local_launcher, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, false, /* backup_to_remote */ @@ -195,7 +195,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, common_args.alternative_mirrors, common_args.git_path->string(), *common_args.local_launcher, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.fetch_absent, @@ -209,7 +209,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, common_args.ca_info, &resolve_symlinks_map, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, has_remote_api ? &*apis.remote : nullptr, common_args.fetch_absent, common_args.jobs); @@ -217,7 +217,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, auto foreign_file_git_map = CreateForeignFileGitMap(&content_cas_map, &import_to_git_map, - serve, + serve ? &*serve : nullptr, common_args.fetch_absent, common_args.jobs); @@ -226,7 +226,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, &critical_git_op_map, &import_to_git_map, &resolve_symlinks_map, - serve, + serve ? &*serve : nullptr, has_remote_api ? &*apis.remote : nullptr, common_args.jobs, multi_repo_tool_name, @@ -237,7 +237,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, CreateDistdirGitMap(&content_cas_map, &import_to_git_map, &critical_git_op_map, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); @@ -247,7 +247,7 @@ auto MultiRepoSetup(std::shared_ptr const& config, &critical_git_op_map, &import_to_git_map, common_args.fetch_absent, - serve, + serve ? &*serve : nullptr, &(*apis.local), has_remote_api ? &*apis.remote : nullptr, common_args.jobs); -- cgit v1.2.3