diff options
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.cpp | 6 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.hpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index 8808e5d8..2106f555 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -24,7 +24,7 @@ auto ApiBundle::Create( gsl::not_null<LocalContext const*> const& local_context, gsl::not_null<RemoteContext const*> const& remote_context, RepositoryConfig const* repo_config) -> ApiBundle { - auto const hash_fct = local_context->storage_config->hash_function; + auto const& hash_fct = local_context->storage_config->hash_function; IExecutionApi::Ptr local_api = std::make_shared<LocalApi>(local_context, repo_config); IExecutionApi::Ptr remote_api = local_api; @@ -37,7 +37,7 @@ auto ApiBundle::Create( remote_context->auth, remote_context->retry_config, config, - hash_fct); + &hash_fct); } return ApiBundle{.hash_function = hash_fct, .local = std::move(local_api), @@ -58,7 +58,7 @@ auto ApiBundle::MakeRemote( authentication, retry_config, config, - hash_function); + &hash_function); } return local; } diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp index 28595010..e342ce55 100644 --- a/src/buildtool/execution_api/common/api_bundle.hpp +++ b/src/buildtool/execution_api/common/api_bundle.hpp @@ -49,9 +49,7 @@ struct ApiBundle final { gsl::not_null<RetryConfig const*> const& retry_config) const -> gsl::not_null<IExecutionApi::Ptr>; - HashFunction const hash_function; - // 7 bytes of alignment. - + HashFunction const& hash_function; gsl::not_null<IExecutionApi::Ptr> const local; gsl::not_null<IExecutionApi::Ptr> const remote; }; |