diff options
author | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-08-11 22:13:23 +0300 |
---|---|---|
committer | Oleg Morozenkov <omorozenkov@gmail.com> | 2015-08-11 22:13:23 +0300 |
commit | 376b88ec09ef8cf71dd823467406c58204485fcc (patch) | |
tree | 9ca599b854d18006c65b26003ce7dbdd416fdf18 /include/tgbot/EventHandler.h | |
parent | d7fbf7149d0e0c1c30972dab68d510ef6ac377dd (diff) |
Fixed compiler's errors in TgTypeParser + fixed indentation + some other fixes
Diffstat (limited to 'include/tgbot/EventHandler.h')
-rw-r--r-- | include/tgbot/EventHandler.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/tgbot/EventHandler.h b/include/tgbot/EventHandler.h index abcf925..1ec2cbe 100644 --- a/include/tgbot/EventHandler.h +++ b/include/tgbot/EventHandler.h @@ -32,23 +32,23 @@ namespace TgBot { class EventHandler { public: - explicit EventHandler(const EventBroadcaster* broadcaster) : _broadcaster(broadcaster) { - } - - inline void handleUpdate(const Update::Ptr& update) const { - _broadcaster->broadcastAnyMessage(update->message); - if (StringTools::startsWith(update->message->text, "/")) { - std::string command = update->message->text.substr(1, update->message->text.find(' ') - 2); - if (!_broadcaster->broadcastCommand(command, update->message)) { - _broadcaster->broadcastUnknownCommand(update->message); - } - } else { - _broadcaster->broadcastNonCommandMessage(update->message); - } - } + explicit EventHandler(const EventBroadcaster* broadcaster) : _broadcaster(broadcaster) { + } + + inline void handleUpdate(const Update::Ptr& update) const { + _broadcaster->broadcastAnyMessage(update->message); + if (StringTools::startsWith(update->message->text, "/")) { + std::string command = update->message->text.substr(1, update->message->text.find(' ') - 2); + if (!_broadcaster->broadcastCommand(command, update->message)) { + _broadcaster->broadcastUnknownCommand(update->message); + } + } else { + _broadcaster->broadcastNonCommandMessage(update->message); + } + } private: - const EventBroadcaster* _broadcaster; + const EventBroadcaster* _broadcaster; }; } |