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/main/describe.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/buildtool/main/describe.cpp') diff --git a/src/buildtool/main/describe.cpp b/src/buildtool/main/describe.cpp index 659ec3ab..1fb861d5 100644 --- a/src/buildtool/main/describe.cpp +++ b/src/buildtool/main/describe.cpp @@ -59,9 +59,10 @@ void PrintFields(nlohmann::json const& fields, } } -void PrettyPrintRule(nlohmann::json const& rdesc, - BuildMaps::Base::EntityName const& rule_name, - gsl::not_null const& repo_config) { +void PrettyPrintRule( + nlohmann::json const& rdesc, + BuildMaps::Base::EntityName const& rule_name, + gsl::not_null const& repo_config) { auto doc = rdesc.find("doc"); if (doc != rdesc.end()) { PrintDoc(*doc, " | "); @@ -228,7 +229,7 @@ void PrintRuleAsOrderedJson(nlohmann::json const& rdesc, auto DescribeUserDefinedRule( BuildMaps::Base::EntityName const& rule_name, - gsl::not_null const& repo_config, + gsl::not_null const& repo_config, std::size_t jobs, bool print_json) -> int { bool failed{}; @@ -266,7 +267,7 @@ auto DescribeUserDefinedRule( } auto DescribeTarget(BuildMaps::Target::ConfiguredTarget const& id, - gsl::not_null const& repo_config, + gsl::not_null const& repo_config, std::size_t jobs, bool print_json) -> int { #ifndef BOOTSTRAP_BUILD_TOOL -- cgit v1.2.3