diff options
author | Nao Pross <naopross@thearcway.org> | 2019-01-22 04:31:30 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-01-22 04:31:30 +0100 |
commit | e584e04c5f8ffb14e50c701c1fd8178457a51743 (patch) | |
tree | 369599a34ae52ade9119d08a19c3fffe2a15b63d /engine/include/task.hpp | |
parent | Update .gitignore, delete test/test (diff) | |
download | flatland-e584e04c5f8ffb14e50c701c1fd8178457a51743.tar.gz flatland-e584e04c5f8ffb14e50c701c1fd8178457a51743.zip |
Add test for task and job, fix bug in job
By being a std::set job did not allow to add duplicate elements,
changing it to a std::multiset fixed the issue.
Diffstat (limited to '')
-rw-r--r-- | engine/include/task.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/include/task.hpp b/engine/include/task.hpp index 8c4f48f..9422a23 100644 --- a/engine/include/task.hpp +++ b/engine/include/task.hpp @@ -27,9 +27,9 @@ namespace flat { std::function<void()> m_callback; }; - struct job : public std::set<task> { + struct job : public std::multiset<task> { inline void add_task(task t) { - insert(begin(), t); + this->insert(t); } void invoke_tasks(); |