From d7b2b493da62b81bd1941b628573d1f024533031 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 20 Apr 2026 14:48:31 +0300 Subject: [PATCH] Remove redundant class specification. --- telegram-bot-api/Client.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 505108e..11d2665 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -679,7 +679,7 @@ class Client::JsonMaskPosition final : public td::Jsonable { } void store(td::JsonValueScope *scope) const { auto object = scope->enter_object(); - object("point", Client::MASK_POINTS[Client::mask_point_to_index(mask_position_->point_)]); + object("point", MASK_POINTS[mask_point_to_index(mask_position_->point_)]); object("x_shift", mask_position_->x_shift_); object("y_shift", mask_position_->y_shift_); object("scale", mask_position_->scale_); @@ -712,7 +712,7 @@ class Client::JsonSticker final : public td::Jsonable { switch (sticker_->full_type_->get_id()) { case td_api::stickerFullTypeRegular::ID: { auto full_type = static_cast(sticker_->full_type_.get()); - object("type", Client::get_sticker_type(make_object())); + object("type", get_sticker_type(make_object())); if (full_type->premium_animation_ != nullptr) { object("premium_animation", JsonFile(full_type->premium_animation_.get(), client_, false)); } @@ -720,7 +720,7 @@ class Client::JsonSticker final : public td::Jsonable { } case td_api::stickerFullTypeMask::ID: { auto full_type = static_cast(sticker_->full_type_.get()); - object("type", Client::get_sticker_type(make_object())); + object("type", get_sticker_type(make_object())); if (full_type->mask_position_ != nullptr) { object("mask_position", JsonMaskPosition(full_type->mask_position_.get())); } @@ -728,7 +728,7 @@ class Client::JsonSticker final : public td::Jsonable { } case td_api::stickerFullTypeCustomEmoji::ID: { auto full_type = static_cast(sticker_->full_type_.get()); - object("type", Client::get_sticker_type(make_object())); + object("type", get_sticker_type(make_object())); if (full_type->custom_emoji_id_ != 0) { object("custom_emoji_id", td::to_string(full_type->custom_emoji_id_)); } @@ -3131,7 +3131,7 @@ class Client::JsonEncryptedPassportElement final : public td::Jsonable { void store(td::JsonValueScope *scope) const { auto object = scope->enter_object(); auto id = element_->type_->get_id(); - object("type", Client::get_passport_element_type(id)); + object("type", get_passport_element_type(id)); switch (id) { case td_api::passportElementTypePhoneNumber::ID: object("phone_number", element_->value_); @@ -4996,7 +4996,7 @@ class Client::JsonBotInfoShortDescription final : public td::Jsonable { class Client::JsonChatAdministratorRights final : public td::Jsonable { public: - JsonChatAdministratorRights(const td_api::chatAdministratorRights *rights, Client::ChatType chat_type) + JsonChatAdministratorRights(const td_api::chatAdministratorRights *rights, ChatType chat_type) : rights_(rights), chat_type_(chat_type) { } @@ -5008,7 +5008,7 @@ class Client::JsonChatAdministratorRights final : public td::Jsonable { private: const td_api::chatAdministratorRights *rights_; - Client::ChatType chat_type_; + ChatType chat_type_; }; class Client::JsonChatPhotos final : public td::Jsonable { @@ -5029,7 +5029,7 @@ class Client::JsonChatPhotos final : public td::Jsonable { class Client::JsonChatMember final : public td::Jsonable { public: - JsonChatMember(const td_api::chatMember *member, Client::ChatType chat_type, const Client *client) + JsonChatMember(const td_api::chatMember *member, ChatType chat_type, const Client *client) : member_(member), chat_type_(chat_type), client_(client) { } @@ -5047,7 +5047,7 @@ class Client::JsonChatMember final : public td::Jsonable { default: UNREACHABLE(); } - object("status", Client::get_chat_member_status(member_->status_)); + object("status", get_chat_member_status(member_->status_)); switch (member_->status_->get_id()) { case td_api::chatMemberStatusCreator::ID: { auto creator = static_cast(member_->status_.get()); @@ -5082,7 +5082,7 @@ class Client::JsonChatMember final : public td::Jsonable { if (!member_->tag_.empty()) { object("tag", member_->tag_); } - if (chat_type_ == Client::ChatType::Supergroup) { + if (chat_type_ == ChatType::Supergroup) { auto restricted = static_cast(member_->status_.get()); object("until_date", restricted->restricted_until_date_); json_store_permissions(object, restricted->permissions_.get()); @@ -5103,13 +5103,13 @@ class Client::JsonChatMember final : public td::Jsonable { private: const td_api::chatMember *member_; - Client::ChatType chat_type_; + ChatType chat_type_; const Client *client_; }; class Client::JsonChatMembers final : public td::Jsonable { public: - JsonChatMembers(const td::vector> &members, Client::ChatType chat_type, + JsonChatMembers(const td::vector> &members, ChatType chat_type, bool administrators_only, bool return_bots, const Client *client) : members_(members) , chat_type_(chat_type) @@ -5134,7 +5134,7 @@ class Client::JsonChatMembers final : public td::Jsonable { } } if (administrators_only_) { - auto status = Client::get_chat_member_status(member->status_); + auto status = get_chat_member_status(member->status_); if (status != "creator" && status != "administrator") { continue; } @@ -5145,7 +5145,7 @@ class Client::JsonChatMembers final : public td::Jsonable { private: const td::vector> &members_; - Client::ChatType chat_type_; + ChatType chat_type_; bool administrators_only_; bool return_bots_; const Client *client_; @@ -5911,7 +5911,7 @@ class Client::JsonStickerSet final : public td::Jsonable { } void store(td::JsonValueScope *scope) const { auto object = scope->enter_object(); - if (sticker_set_->id_ == Client::GREAT_MINDS_SET_ID) { + if (sticker_set_->id_ == GREAT_MINDS_SET_ID) { object("name", GREAT_MINDS_SET_NAME); } else { object("name", sticker_set_->name_); @@ -5921,7 +5921,7 @@ class Client::JsonStickerSet final : public td::Jsonable { client_->json_store_thumbnail(object, sticker_set_->thumbnail_.get()); } - auto type = Client::get_sticker_type(sticker_set_->sticker_type_); + auto type = get_sticker_type(sticker_set_->sticker_type_); object("sticker_type", type); object("contains_masks", td::JsonBool(type == "mask")); @@ -7150,7 +7150,7 @@ class Client::TdOnGetGroupMembersCallback final : public TdQueryCallback { auto group_full_info = move_object_as(result); auto return_bots = to_bool(query_->arg("return_bots")); answer_query( - JsonChatMembers(group_full_info->members_, Client::ChatType::Group, administrators_only_, return_bots, client_), + JsonChatMembers(group_full_info->members_, ChatType::Group, administrators_only_, return_bots, client_), std::move(query_)); } @@ -7162,7 +7162,7 @@ class Client::TdOnGetGroupMembersCallback final : public TdQueryCallback { class Client::TdOnGetSupergroupMembersCallback final : public TdQueryCallback { public: - TdOnGetSupergroupMembersCallback(const Client *client, Client::ChatType chat_type, PromisedQueryPtr query) + TdOnGetSupergroupMembersCallback(const Client *client, ChatType chat_type, PromisedQueryPtr query) : client_(client), chat_type_(chat_type), query_(std::move(query)) { } @@ -7179,7 +7179,7 @@ class Client::TdOnGetSupergroupMembersCallback final : public TdQueryCallback { private: const Client *client_; - Client::ChatType chat_type_; + ChatType chat_type_; PromisedQueryPtr query_; };