From 376b88ec09ef8cf71dd823467406c58204485fcc Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Tue, 11 Aug 2015 22:13:23 +0300 Subject: Fixed compiler's errors in TgTypeParser + fixed indentation + some other fixes --- include/tgbot/EventHandler.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include/tgbot/EventHandler.h') 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; }; } -- cgit v1.2.3