diff options
author | jellybrick <shlee1503@naver.com> | 2020-03-14 23:21:30 +0900 |
---|---|---|
committer | jellybrick <shlee1503@naver.com> | 2020-03-14 23:21:42 +0900 |
commit | 64174491dac84c559db5c48ed850177fa3eb4da0 (patch) | |
tree | 5f7a754d57c2a7ec439f309df5e4b8d964d0834f /src/EventHandler.cpp | |
parent | 19f49b7a2f540a756ed9759b0fa5fb52bf73f20e (diff) |
Fix #127, #128 & Code quality improvements
It seems that the author of this code misunderstood 'Array of PollOption' as 'PollOption'.
Diffstat (limited to 'src/EventHandler.cpp')
-rw-r--r-- | src/EventHandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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, "/")) { |