summaryrefslogtreecommitdiff
path: root/src/buildtool/main/main.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-05-16 11:24:14 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-05-17 10:36:13 +0200
commit580539ab08a098e7f348fee3c46fbf5d44cd4d54 (patch)
treeb73f35182abf0b278ba435925a6cc01381705fc4 /src/buildtool/main/main.cpp
parent0f96e596f42ef8619f173c547d7ee6c1be3aba12 (diff)
downloadjustbuild-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/main/main.cpp')
-rw-r--r--src/buildtool/main/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp
index a5185a47..9f34122a 100644
--- a/src/buildtool/main/main.cpp
+++ b/src/buildtool/main/main.cpp
@@ -431,7 +431,7 @@ void SetupFileChunker() {
[[nodiscard]] auto ReadConfiguredTarget(
std::string const& main_repo,
std::optional<std::filesystem::path> const& main_ws_root,
- gsl::not_null<RepositoryConfig*> const& repo_config,
+ gsl::not_null<const RepositoryConfig*> const& repo_config,
AnalysisArguments const& clargs) -> Target::ConfiguredTarget {
auto const* target_root = repo_config->TargetRoot(main_repo);
if (target_root == nullptr) {
@@ -760,7 +760,7 @@ void ReportTaintedness(const AnalysisResult& result) {
auto DetermineNonExplicitTarget(
std::string const& main_repo,
std::optional<std::filesystem::path> const& main_ws_root,
- gsl::not_null<RepositoryConfig*> const& repo_config,
+ gsl::not_null<const RepositoryConfig*> const& repo_config,
AnalysisArguments const& clargs)
-> std::optional<BuildMaps::Target::ConfiguredTarget> {
auto id =