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/tasks.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/tasks.h') diff --git a/src/tasks.h b/src/tasks.h index f2a77d4..c547432 100644 --- a/src/tasks.h +++ b/src/tasks.h @@ -4,7 +4,7 @@ #pragma once #include -#include +#include #include #include @@ -27,17 +27,17 @@ const std::deque& getTargets(const Settings& settings, //! fulfilled. //! The returned task is removed from the dirty list. //! Return nullptr if no dirty task is ready. -std::shared_ptr getNextTask(const std::list>& allTasks, - std::list>& dirtyTasks); +std::shared_ptr getNextTask(const std::set>& allTasks, + std::set>& dirtyTasks); //! Get list of tasks filtered by name including each of their direct //! dependency tasks (ie. objects tasks from their sources). -std::list> getTasks(const Settings& settings, - const std::vector names = {}, - bool resolve_externals = true); +std::set> getTasks(const Settings& settings, + const std::vector names = {}, + bool resolve_externals = true); //! Generate list of targets from a single configuration, including the final //! link target and all its objects files (if any). -std::list> taskFactory(const BuildConfiguration& config, - const Settings& settings, - const std::string& sourceDir); +std::set> taskFactory(const BuildConfiguration& config, + const Settings& settings, + const std::string& sourceDir); -- cgit v1.2.3