diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-05-29 14:55:51 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-06-09 22:15:32 +0200 |
commit | b74bd9e24e1205b7449404fd05172664b211d82c (patch) | |
tree | af69d4efbdddee347cd82c774880efa6820a0aa2 /src/task.h | |
parent | 15eea63a6e7da37e7b4d643f189e6de150268ff8 (diff) |
Make all task lists std::set instead of std::list to make sure to not contain duplicates.
Diffstat (limited to 'src/task.h')
-rw-r--r-- | src/task.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -6,7 +6,7 @@ #include <vector> #include <string> #include <atomic> -#include <list> +#include <set> #include <memory> #include "libctor.h" @@ -25,7 +25,7 @@ class Task public: Task(const BuildConfiguration& config); - int registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks); + int registerDepTasks(const std::set<std::shared_ptr<Task>>& tasks); virtual std::string name() const; bool dirty(); @@ -52,7 +52,7 @@ public: OutputSystem outputSystem() const; std::string compiler() const; - std::list<std::shared_ptr<Task>> getDependsTasks(); + std::set<std::shared_ptr<Task>> getDependsTasks(); virtual std::string source() const { return {}; } @@ -62,7 +62,7 @@ protected: virtual bool dirtyInner() { return false; } std::vector<std::string> dependsStr; - std::list<std::shared_ptr<Task>> dependsTasks; + std::set<std::shared_ptr<Task>> dependsTasks; const BuildConfiguration& config; TargetType target_type{TargetType::Auto}; Language source_language{Language::Auto}; |