aboutsummaryrefslogtreecommitdiff
path: root/src/cru_event.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-28 19:18:00 +0800
committercrupest <crupest@outlook.com>2018-11-28 19:18:00 +0800
commitf78458173c1baf567cc96880571b380e95a1039a (patch)
tree5bf790a573cff30071628329e1457e3affa0c2bc /src/cru_event.hpp
parentee22597122612cd75fe62f5d808cb51478373fad (diff)
downloadcru-f78458173c1baf567cc96880571b380e95a1039a.tar.gz
cru-f78458173c1baf567cc96880571b380e95a1039a.tar.bz2
cru-f78458173c1baf567cc96880571b380e95a1039a.zip
Refactor event system.
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;
};