diff --git a/td/telegram/Photo.h b/td/telegram/Photo.h index 57b7dc667..c8e103a38 100644 --- a/td/telegram/Photo.h +++ b/td/telegram/Photo.h @@ -64,16 +64,6 @@ struct OfflineInputStickerSet { void store(StorerT &storer) const; template void parse(ParserT &parser); - - struct AsKey { - const OfflineInputStickerSet &key; - template - void store(StorerT &storer) const; - }; - - AsKey as_key() const { - return AsKey{*this}; - } }; struct OfflineInputPeer { @@ -91,16 +81,6 @@ struct OfflineInputPeer { void store(StorerT &storer) const; template void parse(ParserT &parser); - - struct AsKey { - const OfflineInputPeer &key; - template - void store(StorerT &storer) const; - }; - - AsKey as_key() const { - return AsKey{*this}; - } }; struct PhotoSizeSource { @@ -167,16 +147,6 @@ struct PhotoSizeSource { void store(StorerT &storer) const; template void parse(ParserT &parser); - - struct AsKey { - const PhotoSizeSource &key; - template - void store(StorerT &storer) const; - }; - - AsKey as_key() const { - return AsKey{*this}; - } }; struct Photo { diff --git a/td/telegram/Photo.hpp b/td/telegram/Photo.hpp index 1abe1c9b2..0587480c8 100644 --- a/td/telegram/Photo.hpp +++ b/td/telegram/Photo.hpp @@ -31,12 +31,6 @@ void OfflineInputStickerSet::parse(ParserT &parser) { parse(sticker_set_access_hash, parser); } -template -void OfflineInputStickerSet::AsKey::store(StorerT &storer) const { - using td::store; - store(key.sticker_set_id, storer); -} - template void OfflineInputPeer::store(StorerT &storer) const { using td::store; @@ -59,12 +53,6 @@ void OfflineInputPeer::parse(ParserT &parser) { } } -template -void OfflineInputPeer::AsKey::store(StorerT &storer) const { - using td::store; - store(key.dialog_id, storer); -} - template void PhotoSizeSource::store(StorerT &storer) const { using td::store; @@ -125,33 +113,6 @@ void PhotoSizeSource::parse(ParserT &parser) { } } -template -void PhotoSizeSource::AsKey::store(StorerT &storer) const { - using td::store; - store(key.file_type, storer); - store(key.type, storer); - switch (key.type) { - case Type::DialogPhoto: { - auto &dialog_photo = this->key.dialog_photo(); - store(dialog_photo.input_peer.as_key(), storer); - store(dialog_photo.is_big, storer); - break; - } - case Type::StickerSetThumbnail: { - auto &sticker_set_thumbnail = this->key.sticker_set_thumbnail(); - store(sticker_set_thumbnail.input_sticker_set.as_key(), storer); - break; - } - case Type::Thumbnail: { - auto &thumbnail = this->key.thumbnail(); - store(thumbnail.thumbnail_type, storer); - break; - } - case Type::Empty: - break; - } -} - template void store(Dimensions dimensions, StorerT &storer) { store(static_cast((static_cast(dimensions.width) << 16) | dimensions.height), storer); diff --git a/td/telegram/files/FileLocation.hpp b/td/telegram/files/FileLocation.hpp index d118837fd..0ce224ead 100644 --- a/td/telegram/files/FileLocation.hpp +++ b/td/telegram/files/FileLocation.hpp @@ -69,7 +69,6 @@ void PhotoRemoteFileLocation::AsKey::store(StorerT &storer) const { store(key.id_, storer); store(key.volume_id_, storer); store(key.local_id_, storer); - store(key.source_.as_key(), storer); } template