From 69f56ad981da59f026c83b321522ad68283934c5 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 25 Jul 2024 14:35:28 +0200 Subject: Pass LocalContext to LocalApi The context is passed by not_null const pointer to avoid binding to temporaries. The LocalApi also stores the context as const ref for further access and passing it to LocalAction. --- src/buildtool/execution_api/common/api_bundle.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/buildtool/execution_api/common/api_bundle.cpp') diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index 96b24376..edb29970 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -29,10 +29,7 @@ ApiBundle::ApiBundle( retry_config{*retry_config}, remote_config{*remote_exec_config}, hash_function{local_context->storage_config->hash_function}, - local{std::make_shared(local_context->storage_config, - local_context->storage, - local_context->exec_config, - repo_config)}, + local{std::make_shared(local_context, repo_config)}, remote{CreateRemote(remote_exec_config->remote_address)} {} auto ApiBundle::CreateRemote(std::optional const& address) const -- cgit v1.2.3