summaryrefslogtreecommitdiff
path: root/src/libctor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 19:57:00 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 20:06:56 +0100
commit6af7742c35ecdf2831908443ca0e04bf23317a96 (patch)
tree9ada42d1d4b6bcb2618c1325f155429d2035808a /src/libctor.cc
parent648c89e879f739f82ed6dba7df7243e54b98601f (diff)
Rename Configuation struct to configuration and make get/has functions member functions.
Diffstat (limited to 'src/libctor.cc')
-rw-r--r--src/libctor.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libctor.cc b/src/libctor.cc
index 67e734a..69d35cf 100644
--- a/src/libctor.cc
+++ b/src/libctor.cc
@@ -31,8 +31,9 @@ using namespace ctor;
int main(int argc, char* argv[])
{
ctor::settings settings{};
+ const auto& c = ctor::get_configuration();
- settings.builddir = getConfiguration(cfg::builddir, settings.builddir);
+ settings.builddir = c.get(cfg::builddir, settings.builddir);
settings.parallel_processes =
std::max(1u, std::thread::hardware_concurrency()) * 2 - 1;
@@ -265,13 +266,13 @@ Options:
if(print_configure_cmd)
{
no_default_build = true;
- std::cout << getConfiguration("cmd") << "\n";
+ std::cout << c.get("cmd") << "\n";
}
if(print_configure_db)
{
no_default_build = true;
- const auto& c = configuration();
+ const auto& c = ctor::get_configuration();
for(const auto& config : c.tools)
{
std::cout << config.first << ": " << config.second << "\n";