diff options
Diffstat (limited to 'protocols/Telegram/tdlib/td/td/mtproto/utils.h')
-rw-r--r-- | protocols/Telegram/tdlib/td/td/mtproto/utils.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/Telegram/tdlib/td/td/mtproto/utils.h b/protocols/Telegram/tdlib/td/td/mtproto/utils.h index 1033ea86f5..ab4a8064de 100644 --- a/protocols/Telegram/tdlib/td/td/mtproto/utils.h +++ b/protocols/Telegram/tdlib/td/td/mtproto/utils.h @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -29,7 +29,7 @@ class TLObjectStorer final : public Storer { size_t size() const final { if (size_ == std::numeric_limits<size_t>::max()) { TlStorerCalcLength storer; - storer.store_binary(object_.get_id()); + storer.store_binary(T::ID); object_.store(storer); size_ = storer.get_length(); } @@ -37,22 +37,19 @@ class TLObjectStorer final : public Storer { } size_t store(uint8 *ptr) const final { TlStorerUnsafe storer(ptr); - storer.store_binary(object_.get_id()); + storer.store_binary(T::ID); object_.store(storer); return static_cast<size_t>(storer.get_buf() - ptr); } }; namespace mtproto_api { -class Object; class Function; } // namespace mtproto_api namespace mtproto { -TLStorer<mtproto_api::Function> create_storer(const mtproto_api::Function &function); - -TLObjectStorer<mtproto_api::Object> create_storer(const mtproto_api::Object &object); +TLStorer<mtproto_api::Function> create_function_storer(const mtproto_api::Function &function); } // namespace mtproto } // namespace td |