From 580539ab08a098e7f348fee3c46fbf5d44cd4d54 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 16 May 2024 11:24:14 +0200 Subject: RepositoryConfig: Instance should not be changed once populated Once a RepositoryConfig instance gets populated, it must never be changed again. Therefore, all functions accepting these instances should only take them as pointers to const. --- src/buildtool/execution_api/local/local_api.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/local/local_api.hpp') diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index fb76237d..f69a5be2 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -47,7 +47,7 @@ /// \brief API for local execution. class LocalApi final : public IExecutionApi { public: - explicit LocalApi(std::optional> + explicit LocalApi(std::optional> repo_config = std::nullopt) : repo_config_{std::move(repo_config)} {} @@ -533,7 +533,7 @@ class LocalApi final : public IExecutionApi { } private: - std::optional> repo_config_{}; + std::optional> repo_config_{}; gsl::not_null storage_ = &Storage::Instance(); }; -- cgit v1.2.3