aboutsummaryrefslogtreecommitdiff
path: root/src/cru_event.hpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-11-28 19:32:58 +0800
committerGitHub <noreply@github.com>2018-11-28 19:32:58 +0800
commitdd75868a05cfc9d71b26f1197022c03ba481fe33 (patch)
tree6f50579da8be5b6be8792b0d832b76ba822c2760 /src/cru_event.hpp
parentee22597122612cd75fe62f5d808cb51478373fad (diff)
parentd98e9ef82be277190c883e4ee7547516dbd620b6 (diff)
downloadcru-dd75868a05cfc9d71b26f1197022c03ba481fe33.tar.gz
cru-dd75868a05cfc9d71b26f1197022c03ba481fe33.tar.bz2
cru-dd75868a05cfc9d71b26f1197022c03ba481fe33.zip
Merge pull request #30 from crupest/routed-event
Develop routed events.
Diffstat (limited to 'src/cru_event.hpp')
-rw-r--r--src/cru_event.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cru_event.hpp b/src/cru_event.hpp
index 69832a0e..63de7e76 100644
--- a/src/cru_event.hpp
+++ b/src/cru_event.hpp
@@ -5,7 +5,7 @@
#include <type_traits>
#include <functional>
-#include <unordered_map>
+#include <map>
#include "base.hpp"
@@ -76,13 +76,15 @@ namespace cru {
(handler.second)(args);
}
+
+ //TODO: Remove this!
bool IsNoHandler() const
{
return handlers_.empty();
}
private:
- std::unordered_map<EventHandlerToken, EventHandler> handlers_;
+ std::map<EventHandlerToken, EventHandler> handlers_;
EventHandlerToken current_token_ = 0;
};