diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-25 14:35:28 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-30 12:10:06 +0200 |
commit | 69f56ad981da59f026c83b321522ad68283934c5 (patch) | |
tree | d85218053bb97bf623b541d9bc98fc9a3b0cbb44 /src/buildtool/execution_api/common/api_bundle.cpp | |
parent | ab0e0b86fff94bed224f894be6b555272857e336 (diff) | |
download | justbuild-69f56ad981da59f026c83b321522ad68283934c5.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_api/common/api_bundle.cpp')
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<LocalApi>(local_context->storage_config, - local_context->storage, - local_context->exec_config, - repo_config)}, + local{std::make_shared<LocalApi>(local_context, repo_config)}, remote{CreateRemote(remote_exec_config->remote_address)} {} auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const |