summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2022-06-03 11:49:40 +0200
committerAlberto Sartori <alberto.sartori@huawei.com>2022-06-09 09:35:15 +0200
commit4d0deb26e9b5efc33a20b50502084f215d3b39a2 (patch)
tree0745f22ad11457f731f1dc1e6a347718574db26c /src
parentfd58a5eb429d4a9db51f73c06137f1a4ebe41c08 (diff)
downloadjustbuild-4d0deb26e9b5efc33a20b50502084f215d3b39a2.tar.gz
pass by const ref big objects
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/main/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp
index a2af1fe6..1a213d28 100644
--- a/src/buildtool/main/main.cpp
+++ b/src/buildtool/main/main.cpp
@@ -429,9 +429,9 @@ void DetectAndReportPending(std::string const& name,
}
// returns FileRoot and optional local path, if the root is local
-auto ParseRoot(nlohmann::json desc,
- const std::string& repo,
- const std::string& keyword)
+auto ParseRoot(nlohmann::json const& desc,
+ std::string const& repo,
+ std::string const& keyword)
-> std::pair<FileRoot, std::optional<std::filesystem::path>> {
nlohmann::json root = desc[keyword];
if ((not root.is_array()) or root.empty()) {
@@ -487,7 +487,8 @@ auto ParseRoot(nlohmann::json desc,
// Set all roots and name mappings from the command-line arguments and
// return the name of the main repository and main workspace path if local.
-auto DetermineRoots(CommonArguments cargs, AnalysisArguments aargs)
+auto DetermineRoots(CommonArguments const& cargs,
+ AnalysisArguments const& aargs)
-> std::pair<std::string, std::optional<std::filesystem::path>> {
std::optional<std::filesystem::path> main_ws_root;
auto repo_config = nlohmann::json::object();