From f77492425703122c9b977ba3e0f9f5fdd80a08d1 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 21 Jun 2024 09:31:47 +0200 Subject: Make IExecutionApi::Ptr a shared pointer to const ...and use it in ApiBundle. --- src/buildtool/execution_api/common/api_bundle.cpp | 2 +- src/buildtool/execution_api/common/api_bundle.hpp | 6 +++--- src/buildtool/execution_api/common/execution_api.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/buildtool/execution_api/common') diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index 85ab49f1..bbcaa3b5 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -25,7 +25,7 @@ ApiBundle::ApiBundle( remote{CreateRemote(remote_address)} {} auto ApiBundle::CreateRemote(std::optional const& address) const - -> gsl::not_null> { + -> gsl::not_null { if (address) { ExecutionConfiguration config; config.skip_cache_lookup = false; diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp index 2f393dba..58a80677 100644 --- a/src/buildtool/execution_api/common/api_bundle.hpp +++ b/src/buildtool/execution_api/common/api_bundle.hpp @@ -33,10 +33,10 @@ struct ApiBundle final { std::optional const& remote_address); [[nodiscard]] auto CreateRemote(std::optional const& address) - const -> gsl::not_null>; + const -> gsl::not_null; - gsl::not_null> const local; - gsl::not_null> const remote; + gsl::not_null const local; + gsl::not_null const remote; }; #endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_API_BUNDLE_HPP diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 5b6743e3..72663c2e 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -34,7 +34,7 @@ /// Can be used to create actions. class IExecutionApi { public: - using Ptr = std::unique_ptr; + using Ptr = std::shared_ptr; IExecutionApi() = default; IExecutionApi(IExecutionApi const&) = delete; -- cgit v1.2.3