From e166206702c8dbd3162452cf26f368e856ac0138 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 11 Dec 2024 19:15:18 +0100 Subject: More clang-tidy fixes and increase warning level (and fix them) --- src/task.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/task.cc') diff --git a/src/task.cc b/src/task.cc index 680dbf8..a9c0fee 100644 --- a/src/task.cc +++ b/src/task.cc @@ -8,12 +8,12 @@ #include #include -Task::Task(const ctor::build_configuration& config, const ctor::settings& settings, - std::string sourceDir) - : config(config) +Task::Task(const ctor::build_configuration& config_, const ctor::settings& settings_, + std::string sourceDir_) + : config(config_) , output_system(config.system) - , settings(settings) - , sourceDir(std::move(sourceDir)) + , settings(settings_) + , sourceDir(std::move(sourceDir_)) { } @@ -145,6 +145,7 @@ std::string Task::compiler() const case ctor::output_system::build: return c.get(ctor::cfg::build_cc, "/usr/bin/gcc"); } + break; case ctor::language::cpp: switch(outputSystem()) { @@ -153,11 +154,15 @@ std::string Task::compiler() const case ctor::output_system::build: return c.get(ctor::cfg::build_cxx, "/usr/bin/g++"); } + break; default: std::cerr << "Unknown CC target type\n"; exit(1); break; } + + std::cerr << "Unhandled compiler!\n"; + exit(1); } std::vector> Task::getDependsTasks() -- cgit v1.2.3