diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2022-06-03 11:49:40 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2022-06-09 09:35:15 +0200 |
commit | 4d0deb26e9b5efc33a20b50502084f215d3b39a2 (patch) | |
tree | 0745f22ad11457f731f1dc1e6a347718574db26c /src/buildtool/main/main.cpp | |
parent | fd58a5eb429d4a9db51f73c06137f1a4ebe41c08 (diff) | |
download | justbuild-4d0deb26e9b5efc33a20b50502084f215d3b39a2.tar.gz |
pass by const ref big objects
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 9 |
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(); |