summaryrefslogtreecommitdiff
path: root/include/tgbot/EventBroadcaster.h
diff options
context:
space:
mode:
authorOleg Morozenkov <omorozenkov@gmail.com>2018-06-17 22:03:01 +0300
committerGitHub <noreply@github.com>2018-06-17 22:03:01 +0300
commita854dd975f13e71338c80d85717be6fb6e8c185a (patch)
tree6db1b94ea9ca29b72f7788f7f8c62c2ae20222c2 /include/tgbot/EventBroadcaster.h
parentc8d40dccabaaa406faed6c0797a92bac811c9d0f (diff)
parentb89c8f2fc73e25f1740c191faf0c7e8b9c18c9b9 (diff)
Merge pull request #67 from JellyBrick/parser_refactor
Code optimization
Diffstat (limited to 'include/tgbot/EventBroadcaster.h')
-rw-r--r--include/tgbot/EventBroadcaster.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tgbot/EventBroadcaster.h b/include/tgbot/EventBroadcaster.h
index 5a41c70..0a4ebe9 100644
--- a/include/tgbot/EventBroadcaster.h
+++ b/include/tgbot/EventBroadcaster.h
@@ -26,7 +26,7 @@
#include <string>
#include <functional>
#include <vector>
-#include <map>
+#include <unordered_map>
#include "tgbot/types/Message.h"
#include "tgbot/types/InlineQuery.h"
@@ -133,7 +133,7 @@ private:
}
inline bool broadcastCommand(const std::string command, const Message::Ptr message) const {
- std::map<std::string, MessageListener>::const_iterator iter = _onCommandListeners.find(command);
+ std::unordered_map<std::string, MessageListener>::const_iterator iter = _onCommandListeners.find(command);
if (iter == _onCommandListeners.end()) {
return false;
}
@@ -162,7 +162,7 @@ private:
}
std::vector<MessageListener> _onAnyMessageListeners;
- std::map<std::string, MessageListener> _onCommandListeners;
+ std::unordered_map<std::string, MessageListener> _onCommandListeners;
std::vector<MessageListener> _onUnknownCommandListeners;
std::vector<MessageListener> _onNonCommandMessageListeners;
std::vector<InlineQueryListener> _onInlineQueryListeners;