diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-05-16 11:24:14 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-05-17 10:36:13 +0200 |
commit | 580539ab08a098e7f348fee3c46fbf5d44cd4d54 (patch) | |
tree | b73f35182abf0b278ba435925a6cc01381705fc4 /src/buildtool/execution_api/local/local_api.hpp | |
parent | 0f96e596f42ef8619f173c547d7ee6c1be3aba12 (diff) | |
download | justbuild-580539ab08a098e7f348fee3c46fbf5d44cd4d54.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_api/local/local_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_api.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<gsl::not_null<RepositoryConfig*>> + explicit LocalApi(std::optional<gsl::not_null<const RepositoryConfig*>> repo_config = std::nullopt) : repo_config_{std::move(repo_config)} {} @@ -533,7 +533,7 @@ class LocalApi final : public IExecutionApi { } private: - std::optional<gsl::not_null<RepositoryConfig*>> repo_config_{}; + std::optional<gsl::not_null<const RepositoryConfig*>> repo_config_{}; gsl::not_null<Storage const*> storage_ = &Storage::Instance(); }; |