From 64174491dac84c559db5c48ed850177fa3eb4da0 Mon Sep 17 00:00:00 2001 From: jellybrick Date: Sat, 14 Mar 2020 23:21:30 +0900 Subject: Fix #127, #128 & Code quality improvements It seems that the author of this code misunderstood 'Array of PollOption' as 'PollOption'. --- src/EventHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/EventHandler.cpp') diff --git a/src/EventHandler.cpp b/src/EventHandler.cpp index cd67379..43f2eb1 100644 --- a/src/EventHandler.cpp +++ b/src/EventHandler.cpp @@ -7,7 +7,7 @@ using namespace std; namespace TgBot { -void EventHandler::handleUpdate(Update::Ptr update) const { +void EventHandler::handleUpdate(const Update::Ptr& update) const { if (update->inlineQuery != nullptr) { _broadcaster.broadcastInlineQuery(update->inlineQuery); } @@ -22,7 +22,7 @@ void EventHandler::handleUpdate(Update::Ptr update) const { } } -void EventHandler::handleMessage(Message::Ptr message) const { +void EventHandler::handleMessage(const Message::Ptr& message) const { _broadcaster.broadcastAnyMessage(message); if (StringTools::startsWith(message->text, "/")) { -- cgit v1.2.3