From b74bd9e24e1205b7449404fd05172664b211d82c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 29 May 2022 14:55:51 +0200 Subject: Make all task lists std::set instead of std::list to make sure to not contain duplicates. --- src/task.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/task.cc') diff --git a/src/task.cc b/src/task.cc index 8a9eefa..b8fce06 100644 --- a/src/task.cc +++ b/src/task.cc @@ -12,7 +12,7 @@ Task::Task(const BuildConfiguration& config) { } -int Task::registerDepTasks(const std::list>& tasks) +int Task::registerDepTasks(const std::set>& tasks) { for(const auto& depStr : depends()) { @@ -21,7 +21,7 @@ int Task::registerDepTasks(const std::list>& tasks) { if(task->target() == depStr) { - dependsTasks.push_back(task); + dependsTasks.insert(task); found = true; } } @@ -146,7 +146,7 @@ std::string Task::compiler() const } } -std::list> Task::getDependsTasks() +std::set> Task::getDependsTasks() { return dependsTasks; } -- cgit v1.2.3