diff options
author | Alexander Zaitsev <zamazan4ik@tut.by> | 2020-03-13 03:46:58 +0300 |
---|---|---|
committer | Alexander Zaitsev <zamazan4ik@tut.by> | 2020-03-13 03:46:58 +0300 |
commit | 806e7e5a3edf4fdf2b9c48469a7bc23307b200b0 (patch) | |
tree | cb73c1bd3d8a2cfaba3809b6a6f7fb134732118a /src/net/TgLongPoll.cpp | |
parent | d1c6a8062577f5ce58105afff2d0a1887bfff957 (diff) |
fix: use C++ fixed-width types instead of C types
- C++ standard doesn't guarantee that C-types without std namespace are available in global namespace. So the proper solution (since it's C++ library) is using C++ types instead of C
Tested:
- Local build
- By unit-tests
Diffstat (limited to 'src/net/TgLongPoll.cpp')
-rw-r--r-- | src/net/TgLongPoll.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/TgLongPoll.cpp b/src/net/TgLongPoll.cpp index 913ffdf..0138620 100644 --- a/src/net/TgLongPoll.cpp +++ b/src/net/TgLongPoll.cpp @@ -1,12 +1,14 @@ #include "tgbot/net/TgLongPoll.h" +#include <cstdint> + namespace TgBot { -TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) +TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, std::int32_t limit, std::int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) : _api(api), _eventHandler(eventHandler), _limit(limit), _timeout(timeout), _allowupdates(allowupdates) { } -TgLongPoll::TgLongPoll(const Bot& bot, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) : +TgLongPoll::TgLongPoll(const Bot& bot, std::int32_t limit, std::int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) : TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, allowupdates) { } |