From 26fac5bf7e87dd5704a967ee4c744228b93d20b7 Mon Sep 17 00:00:00 2001 From: Alexander Zaitsev Date: Fri, 13 Mar 2020 03:56:35 +0300 Subject: fix: use std::size_t instead of size_t - use C++ size_t from std namespace instead of a version from global namespace Tested: - Local build - Unit-tests --- src/EventHandler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/EventHandler.cpp') diff --git a/src/EventHandler.cpp b/src/EventHandler.cpp index 505704d..cd67379 100644 --- a/src/EventHandler.cpp +++ b/src/EventHandler.cpp @@ -1,5 +1,7 @@ #include "tgbot/EventHandler.h" + #include +#include using namespace std; @@ -24,9 +26,9 @@ void EventHandler::handleMessage(Message::Ptr message) const { _broadcaster.broadcastAnyMessage(message); if (StringTools::startsWith(message->text, "/")) { - size_t splitPosition; - size_t spacePosition = message->text.find(' '); - size_t atSymbolPosition = message->text.find('@'); + std::size_t splitPosition; + std::size_t spacePosition = message->text.find(' '); + std::size_t atSymbolPosition = message->text.find('@'); if (spacePosition == string::npos) { if (atSymbolPosition == string::npos) { splitPosition = message->text.size(); -- cgit v1.2.3