Skip to content

Commit 8599465

Browse files
committed
Minor improvements.
1 parent 16ca190 commit 8599465

9 files changed

Lines changed: 18 additions & 12 deletions

File tree

‎benchmark/bench_crypto.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class AesCtrOpenSSLBench final : public td::Benchmark {
285285
state.init(as_slice(key), as_slice(iv));
286286
for (int i = 0; i < n; i++) {
287287
int len = 0;
288-
int int_size = static_cast<int>(DATA_SIZE);
288+
auto int_size = static_cast<int>(DATA_SIZE);
289289
EVP_EncryptUpdate(ctx, data_slice.ubegin(), &len, data_slice.ubegin(), int_size);
290290
CHECK(len == int_size);
291291
}

‎td/generate/scheme/td_api.tl‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ premiumGiftPaymentOption currency:string amount:int53 star_count:int53 discount_
982982
//@description Contains a list of options for gifting Telegram Premium to a user @options The list of options sorted by Telegram Premium subscription duration
983983
premiumGiftPaymentOptions options:vector<premiumGiftPaymentOption> = PremiumGiftPaymentOptions;
984984

985-
//@description Describes an option for creation of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments
985+
//@description Describes an option for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments
986986
//@currency ISO 4217 currency code for Telegram Premium gift code payment
987987
//@amount The amount to pay, in the smallest units of the currency
988988
//@winner_count Number of users which will be able to activate the gift codes
@@ -991,7 +991,7 @@ premiumGiftPaymentOptions options:vector<premiumGiftPaymentOption> = PremiumGift
991991
//@store_product_quantity Number of times the store product must be paid
992992
premiumGiveawayPaymentOption currency:string amount:int53 winner_count:int32 month_count:int32 store_product_id:string store_product_quantity:int32 = PremiumGiveawayPaymentOption;
993993

994-
//@description Contains a list of options for creation of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members @options The list of options
994+
//@description Contains a list of options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members @options The list of options
995995
premiumGiveawayPaymentOptions options:vector<premiumGiveawayPaymentOption> = PremiumGiveawayPaymentOptions;
996996

997997
//@description Contains information about a Telegram Premium gift code
@@ -1021,7 +1021,7 @@ starPaymentOptions options:vector<starPaymentOption> = StarPaymentOptions;
10211021
//@is_default True, if the option must be chosen by default
10221022
starGiveawayWinnerOption winner_count:int32 won_star_count:int53 is_default:Bool = StarGiveawayWinnerOption;
10231023

1024-
//@description Describes an option for creation of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments
1024+
//@description Describes an option for creating of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments
10251025
//@currency ISO 4217 currency code for the payment
10261026
//@amount The amount to pay, in the smallest units of the currency
10271027
//@star_count Number of Telegram Stars that will be distributed among winners
@@ -1032,7 +1032,7 @@ starGiveawayWinnerOption winner_count:int32 won_star_count:int53 is_default:Bool
10321032
//@is_additional True, if the option must be shown only in the full list of payment options
10331033
starGiveawayPaymentOption currency:string amount:int53 star_count:int53 store_product_id:string yearly_boost_count:int32 winner_options:vector<starGiveawayWinnerOption> is_default:Bool is_additional:Bool = StarGiveawayPaymentOption;
10341034

1035-
//@description Contains a list of options for creation of Telegram Star giveaway @options The list of options
1035+
//@description Contains a list of options for creating of Telegram Star giveaway @options The list of options
10361036
starGiveawayPaymentOptions options:vector<starGiveawayPaymentOption> = StarGiveawayPaymentOptions;
10371037

10381038

@@ -6681,7 +6681,7 @@ pushMessageContentScreenshotTaken = PushMessageContent;
66816681
//@is_pinned True, if the message is a pinned message with the specified content
66826682
pushMessageContentSticker sticker:sticker emoji:string is_pinned:Bool = PushMessageContent;
66836683

6684-
//@description A message with a story @is_mention True if the user was mentioned in the story @is_pinned True, if the message is a pinned message with the specified content
6684+
//@description A message with a story @is_mention True, if the user was mentioned in the story @is_pinned True, if the message is a pinned message with the specified content
66856685
pushMessageContentStory is_mention:Bool is_pinned:Bool = PushMessageContent;
66866686

66876687
//@description A text message @text Message text @is_pinned True, if the message is a pinned message with the specified content
@@ -11851,7 +11851,7 @@ getAvailableGifts = Gifts;
1185111851
//@description Sends a gift to another user or channel chat. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
1185211852
//@gift_id Identifier of the gift to send
1185311853
//@owner_id Identifier of the user or the channel chat that will receive the gift
11854-
//@text Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
11854+
//@text Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
1185511855
//-Must be empty if the receiver enabled paid messages
1185611856
//@is_private Pass true to show gift text and sender only to the gift receiver; otherwise, everyone will be able to see them
1185711857
//@pay_for_upgrade Pass true to additionally pay for the gift upgrade and allow the receiver to upgrade it for free
@@ -12383,7 +12383,7 @@ getPremiumState = PremiumState;
1238312383
//@description Returns available options for gifting Telegram Premium to a user
1238412384
getPremiumGiftPaymentOptions = PremiumGiftPaymentOptions;
1238512385

12386-
//@description Returns available options for creation of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members
12386+
//@description Returns available options for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members
1238712387
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user
1238812388
getPremiumGiveawayPaymentOptions boosted_chat_id:int53 = PremiumGiveawayPaymentOptions;
1238912389

‎td/telegram/BusinessConnectionManager.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "td/telegram/MessageSelfDestructType.h"
2626
#include "td/telegram/MessagesManager.h"
2727
#include "td/telegram/OptionManager.h"
28+
#include "td/telegram/Photo.h"
2829
#include "td/telegram/ReplyMarkup.h"
2930
#include "td/telegram/ServerMessageId.h"
3031
#include "td/telegram/Td.h"

‎td/telegram/DialogActionBar.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "td/telegram/UserManager.h"
1212

1313
#include "td/utils/logging.h"
14+
#include "td/utils/misc.h"
1415

1516
namespace td {
1617

‎td/telegram/DialogActionBar.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "td/telegram/DialogId.h"
1010
#include "td/telegram/FolderId.h"
1111
#include "td/telegram/td_api.h"
12+
#include "td/telegram/telegram_api.h"
1213

1314
#include "td/utils/common.h"
1415
#include "td/utils/tl_helpers.h"

‎td/telegram/Premium.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
#include "td/utils/SliceBuilder.h"
4545
#include "td/utils/Status.h"
4646

47+
#include <algorithm>
48+
4749
namespace td {
4850

4951
static td_api::object_ptr<td_api::PremiumFeature> get_premium_feature_object(Slice premium_feature) {
@@ -1235,7 +1237,8 @@ void get_premium_state(Td *td, Promise<td_api::object_ptr<td_api::premiumState>>
12351237
td->create_handler<GetPremiumPromoQuery>(std::move(promise))->send();
12361238
}
12371239

1238-
void get_premium_gift_options(Td *td, Promise<td_api::object_ptr<td_api::premiumGiftPaymentOptions>> &&promise) {
1240+
void get_premium_gift_payment_options(Td *td,
1241+
Promise<td_api::object_ptr<td_api::premiumGiftPaymentOptions>> &&promise) {
12391242
td->stickers_manager_->load_premium_gift_sticker_set(
12401243
PromiseCreator::lambda([td, promise = std::move(promise)](Result<Unit> &&result) mutable {
12411244
if (result.is_error()) {

‎td/telegram/Premium.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void click_premium_subscription_button(Td *td, Promise<Unit> &&promise);
4444

4545
void get_premium_state(Td *td, Promise<td_api::object_ptr<td_api::premiumState>> &&promise);
4646

47-
void get_premium_gift_options(Td *td, Promise<td_api::object_ptr<td_api::premiumGiftPaymentOptions>> &&promise);
47+
void get_premium_gift_payment_options(Td *td, Promise<td_api::object_ptr<td_api::premiumGiftPaymentOptions>> &&promise);
4848

4949
void get_premium_giveaway_options(Td *td, DialogId boosted_dialog_id,
5050
Promise<td_api::object_ptr<td_api::premiumGiveawayPaymentOptions>> &&promise);

‎td/telegram/Requests.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7559,7 +7559,7 @@ void Requests::on_request(uint64 id, const td_api::getPremiumState &request) {
75597559
void Requests::on_request(uint64 id, const td_api::getPremiumGiftPaymentOptions &request) {
75607560
CHECK_IS_USER();
75617561
CREATE_REQUEST_PROMISE();
7562-
get_premium_gift_options(td_, std::move(promise));
7562+
get_premium_gift_payment_options(td_, std::move(promise));
75637563
}
75647564

75657565
void Requests::on_request(uint64 id, const td_api::getPremiumGiveawayPaymentOptions &request) {

‎tdutils/td/utils/Ed25519.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Ed25519 {
3737
bool operator==(const PublicKey &other) const {
3838
return octet_string_ == other.octet_string_;
3939
}
40-
40+
4141
bool operator!=(const PublicKey &other) const {
4242
return octet_string_ != other.octet_string_;
4343
}

0 commit comments

Comments
 (0)