From cb5f269b13429f0e1ffbc41426227983e5ccaeba Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 20 Sep 2021 17:31:54 +0200 Subject: Simplify/fix task dependency calculation. And tasks unit-tests. --- src/task.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/task.cc') diff --git a/src/task.cc b/src/task.cc index 962a02b..4cdfa5e 100644 --- a/src/task.cc +++ b/src/task.cc @@ -3,17 +3,15 @@ #include #include -Task::Task(const BuildConfiguration& config, - const std::vector& depends) - : dependsStr(depends) - , config(config) +Task::Task(const BuildConfiguration& config) + : config(config) , output_system(config.system) { } int Task::registerDepTasks(const std::list>& tasks) { - for(auto const& depStr : dependsStr) + for(const auto& depStr : depends()) { bool found{false}; for(const auto& task : tasks) -- cgit v1.2.3