diff options
author | Mio <a771644612@live.com> | 2018-03-21 12:54:45 +0800 |
---|---|---|
committer | Mio <a771644612@live.com> | 2018-03-21 12:54:45 +0800 |
commit | 297e5bc0f8cb6a7fd0f3fbf1a722da7d47d6dea3 (patch) | |
tree | ab18481c4775b76c7e021c5b36d272709cb1776d | |
parent | 81ab7f5e8929589b352a5f621cfb98fcb2929cec (diff) |
rename _stringarrayptr with _allowupdates to stay the same with getUpdates()
-rw-r--r-- | include/tgbot/net/TgLongPoll.h | 2 | ||||
-rw-r--r-- | src/net/TgLongPoll.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/tgbot/net/TgLongPoll.h b/include/tgbot/net/TgLongPoll.h index 3c0988a..93ace5b 100644 --- a/include/tgbot/net/TgLongPoll.h +++ b/include/tgbot/net/TgLongPoll.h @@ -48,7 +48,7 @@ private: int32_t _lastUpdateId = 0; int32_t _limit; int32_t _timeout; - std::shared_ptr<std::vector<std::string>> _stringarrayptr; + std::shared_ptr<std::vector<std::string>> _allowupdates; const Api* _api; const EventHandler* _eventHandler; }; diff --git a/src/net/TgLongPoll.cpp b/src/net/TgLongPoll.cpp index 8d93991..30ce815 100644 --- a/src/net/TgLongPoll.cpp +++ b/src/net/TgLongPoll.cpp @@ -24,16 +24,16 @@ namespace TgBot { -TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& stringarrayptr) - : _api(api), _eventHandler(eventHandler), _limit(limit), _timeout(timeout), _stringarrayptr(stringarrayptr) { +TgLongPoll::TgLongPoll(const Api* api, const EventHandler* eventHandler, int32_t limit, 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>>& stringarrayptr) : - TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, stringarrayptr) { +TgLongPoll::TgLongPoll(const Bot& bot, int32_t limit, int32_t timeout, const std::shared_ptr<std::vector<std::string>>& allowupdates) : + TgLongPoll(&bot.getApi(), &bot.getEventHandler(), limit, timeout, allowupdates) { } void TgLongPoll::start() { - std::vector<Update::Ptr> updates = _api->getUpdates(_lastUpdateId, _limit, _timeout, _stringarrayptr); + std::vector<Update::Ptr> updates = _api->getUpdates(_lastUpdateId, _limit, _timeout, _allowupdates); for (Update::Ptr& item : updates) { if (item->updateId >= _lastUpdateId) { _lastUpdateId = item->updateId + 1; |