diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 19:15:18 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 21:48:37 +0100 |
commit | e166206702c8dbd3162452cf26f368e856ac0138 (patch) | |
tree | e4e659fc91b0a47f04755b6298b8085370aefc8d /src/task.cc | |
parent | 936fb83eec4038a48e6e42f9f5d93677dc216ab4 (diff) |
More clang-tidy fixes and increase warning level (and fix them)
Diffstat (limited to 'src/task.cc')
-rw-r--r-- | src/task.cc | 15 |
1 files changed, 10 insertions, 5 deletions
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 <algorithm> #include <utility> -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<std::shared_ptr<Task>> Task::getDependsTasks() |