diff options
author | Egor Pugin <egor.pugin@gmail.com> | 2020-03-13 13:45:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 13:45:37 +0300 |
commit | dee88d3099607d6fa49e2775aaa8a6cb2d77d710 (patch) | |
tree | 74e5daa9a58f3a97b417925a212ac2cd31487a5e /src/EventHandler.cpp | |
parent | d1c6a8062577f5ce58105afff2d0a1887bfff957 (diff) | |
parent | 26fac5bf7e87dd5704a967ee4c744228b93d20b7 (diff) |
Merge pull request #129 from reo7sp/fix/use_proper_types
fix: use C++ fixed-width types instead of C types
Diffstat (limited to 'src/EventHandler.cpp')
-rw-r--r-- | src/EventHandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <algorithm> +#include <cstddef> 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(); |