summaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2019-01-23 15:04:11 +0100
committerancarola <raffaele.ancarola@epfl.ch>2019-01-23 15:04:11 +0100
commitd672a56aa50ab34672bc102ac6b3562945bf863c (patch)
treef78d2717fa8c63f9fb6c20004b8c725273b7d7d2 /engine
parentUse custom comparison for core::prioritize (instead of std::less) (diff)
downloadflatland-d672a56aa50ab34672bc102ac6b3562945bf863c.tar.gz
flatland-d672a56aa50ab34672bc102ac6b3562945bf863c.zip
signal opt
Diffstat (limited to 'engine')
-rw-r--r--engine/include/core/signal.hpp4
-rw-r--r--engine/signal.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/engine/include/core/signal.hpp b/engine/include/core/signal.hpp
index 755f3ed..2393bc7 100644
--- a/engine/include/core/signal.hpp
+++ b/engine/include/core/signal.hpp
@@ -38,7 +38,7 @@ namespace flat
class channel : virtual public object
{
/* Post processing signal stacking */
- prior_set<signal> stack;
+ queue<signal> stack;
/* Listeners list */
std::list<listener*> listeners;
@@ -51,7 +51,7 @@ namespace flat
public:
- channel(const std::string& id = "", priority_t priority = priority_t::none);
+ channel(const std::string& id = "", priority_t task_priority = priority_t::none);
~channel();
void emit(const signal&);
diff --git a/engine/signal.cpp b/engine/signal.cpp
index 3804e22..5eac3eb 100644
--- a/engine/signal.cpp
+++ b/engine/signal.cpp
@@ -1,4 +1,5 @@
#include "core/signal.hpp"
+#include <functional>
using namespace std;
using namespace flat::core;
@@ -14,8 +15,7 @@ channel::channel(const string& id, priority_t prior)
;
/* Initialize task, post-process, fifth priority */
- checker = new task( this,
- &channel::post_processing,
+ checker = new task( bind(&channel::post_processing, this),
prior);
string ID = (id.empty()) ? object::random_id() : id;