From 806e7e5a3edf4fdf2b9c48469a7bc23307b200b0 Mon Sep 17 00:00:00 2001 From: Alexander Zaitsev Date: Fri, 13 Mar 2020 03:46:58 +0300 Subject: 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 --- src/net/TgLongPoll.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/net/TgLongPoll.cpp') 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 + namespace TgBot { -TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, int32_t timeout, const std::shared_ptr>& allowupdates) +TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, std::int32_t limit, std::int32_t timeout, const std::shared_ptr>& 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>& allowupdates) : +TgLongPoll::TgLongPoll(const Bot& bot, std::int32_t limit, std::int32_t timeout, const std::shared_ptr>& allowupdates) : TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, allowupdates) { } -- cgit v1.2.3