aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-06-05 15:46:08 +0300
committerlevlam <levlam@telegram.org>2026-06-05 15:46:08 +0300
commitc19deb1c9fb6d1ecd37db8f4d8148666bbdbb79d (patch)
tree43f1d10ee84d03d917df61d211b997f713e59590
parentc5dfef637e27cc31d78811d7a255b84615582547 (diff)
Remove empty second parameter of static_assert.
-rw-r--r--benchmark/bench_actor.cpp4
-rw-r--r--memprof/memprof.cpp4
-rw-r--r--memprof/memprof_stat.cpp4
-rw-r--r--td/telegram/AuthManager.cpp3
-rw-r--r--td/telegram/BotInfoManager.cpp3
-rw-r--r--td/telegram/DeviceTokenManager.cpp3
-rw-r--r--td/telegram/DialogId.cpp9
-rw-r--r--td/telegram/DialogManager.cpp14
-rw-r--r--td/telegram/MessageEntity.cpp2
-rw-r--r--td/telegram/MessageQueryManager.cpp3
-rw-r--r--td/telegram/MessagesManager.cpp12
-rw-r--r--td/telegram/ReactionManager.cpp6
-rw-r--r--td/telegram/Requests.cpp32
-rw-r--r--td/telegram/SecretChatActor.cpp3
-rw-r--r--td/telegram/StarManager.cpp3
-rw-r--r--td/telegram/StickersManager.cpp33
-rw-r--r--td/telegram/UserManager.cpp12
-rw-r--r--tdutils/td/utils/StealingQueue.h2
-rw-r--r--tdutils/td/utils/WaitFreeHashMap.h2
-rw-r--r--tdutils/td/utils/WaitFreeHashSet.h2
-rw-r--r--tdutils/td/utils/crypto.cpp4
21 files changed, 62 insertions, 98 deletions
diff --git a/benchmark/bench_actor.cpp b/benchmark/bench_actor.cpp
index dee1d8aac..cd70c59c7 100644
--- a/benchmark/bench_actor.cpp
+++ b/benchmark/bench_actor.cpp
@@ -87,7 +87,7 @@ class RingBench final : public td::Benchmark {
public:
td::string get_description() const final {
static const char *types[] = {"later", "immediate", "raw", "tail", "lambda"};
- static_assert(0 <= type && type < 5, "");
+ static_assert(0 <= type && type < 5);
return PSTRING() << "Ring (send_" << types[type] << ") (threads_n = " << thread_n_ << ")";
}
@@ -174,7 +174,7 @@ class QueryBench final : public td::Benchmark {
public:
td::string get_description() const final {
static const char *types[] = {"callback", "immediate future", "delayed future", "dummy", "lambda", "lambda_future"};
- static_assert(0 <= type && type < 6, "");
+ static_assert(0 <= type && type < 6);
return PSTRING() << "QueryBench: " << types[type];
}
diff --git a/memprof/memprof.cpp b/memprof/memprof.cpp
index bcca13a6d..9925da0da 100644
--- a/memprof/memprof.cpp
+++ b/memprof/memprof.cpp
@@ -213,8 +213,8 @@ void register_xalloc(malloc_info *info, std::int32_t diff) {
extern "C" {
static void *malloc_with_frame(std::size_t size, const Backtrace &frame) {
- static_assert(RESERVED_SIZE % alignof(std::max_align_t) == 0, "fail");
- static_assert(RESERVED_SIZE >= sizeof(malloc_info), "fail");
+ static_assert(RESERVED_SIZE % alignof(std::max_align_t) == 0);
+ static_assert(RESERVED_SIZE >= sizeof(malloc_info));
#if TD_DARWIN
static void *malloc_void = dlsym(RTLD_NEXT, "malloc");
static auto malloc_old = *reinterpret_cast<decltype(malloc) **>(&malloc_void);
diff --git a/memprof/memprof_stat.cpp b/memprof/memprof_stat.cpp
index be5fb2664..aada3b92b 100644
--- a/memprof/memprof_stat.cpp
+++ b/memprof/memprof_stat.cpp
@@ -55,8 +55,8 @@ static constexpr std::size_t RESERVED_SIZE = 16;
static constexpr std::int32_t MALLOC_INFO_MAGIC = 0x27138373;
static void *do_malloc(std::size_t size) {
- static_assert(RESERVED_SIZE % alignof(std::max_align_t) == 0, "fail");
- static_assert(RESERVED_SIZE >= sizeof(malloc_info), "fail");
+ static_assert(RESERVED_SIZE % alignof(std::max_align_t) == 0);
+ static_assert(RESERVED_SIZE >= sizeof(malloc_info));
#if TD_DARWIN
static void *malloc_void = dlsym(RTLD_NEXT, "malloc");
static auto malloc_old = *reinterpret_cast<decltype(malloc) **>(&malloc_void);
diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp
index bcc7c297e..8a99e8c29 100644
--- a/td/telegram/AuthManager.cpp
+++ b/td/telegram/AuthManager.cpp
@@ -1086,8 +1086,7 @@ void AuthManager::on_send_code_result(NetQueryPtr &&net_query) {
void AuthManager::on_set_premium_purchase_transaction_result(NetQueryPtr &&net_query) {
static_assert(std::is_same<telegram_api::payments_assignAppStoreTransaction::ReturnType,
- telegram_api::payments_assignPlayMarketTransaction::ReturnType>::value,
- "");
+ telegram_api::payments_assignPlayMarketTransaction::ReturnType>::value);
auto result = fetch_result<telegram_api::payments_assignPlayMarketTransaction>(std::move(net_query));
if (result.is_error()) {
return on_current_query_error(result.move_as_error());
diff --git a/td/telegram/BotInfoManager.cpp b/td/telegram/BotInfoManager.cpp
index 4d32c00c6..c33710a29 100644
--- a/td/telegram/BotInfoManager.cpp
+++ b/td/telegram/BotInfoManager.cpp
@@ -402,8 +402,7 @@ class BotInfoManager::AddPreviewMediaQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::bots_addPreviewMedia::ReturnType,
- telegram_api::bots_editPreviewMedia::ReturnType>::value,
- "");
+ telegram_api::bots_editPreviewMedia::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::bots_addPreviewMedia>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/DeviceTokenManager.cpp b/td/telegram/DeviceTokenManager.cpp
index da5e43dd1..049df2d0d 100644
--- a/td/telegram/DeviceTokenManager.cpp
+++ b/td/telegram/DeviceTokenManager.cpp
@@ -421,8 +421,7 @@ void DeviceTokenManager::on_result(NetQueryPtr net_query) {
CHECK(info.state != TokenInfo::State::Sync);
static_assert(std::is_same<telegram_api::account_registerDevice::ReturnType,
- telegram_api::account_unregisterDevice::ReturnType>::value,
- "");
+ telegram_api::account_unregisterDevice::ReturnType>::value);
auto r_flag = fetch_result<telegram_api::account_registerDevice>(std::move(net_query));
if (r_flag.is_ok() && r_flag.ok()) {
if (info.promise) {
diff --git a/td/telegram/DialogId.cpp b/td/telegram/DialogId.cpp
index a83c41a8b..56aebbe4e 100644
--- a/td/telegram/DialogId.cpp
+++ b/td/telegram/DialogId.cpp
@@ -19,12 +19,11 @@ bool DialogId::is_valid() const {
DialogType DialogId::get_type() const {
// check that valid ranges are continuous
- static_assert(ZERO_CHANNEL_ID + 1 == -ChatId::MAX_CHAT_ID, "");
- static_assert(
- ZERO_SECRET_CHAT_ID + std::numeric_limits<int32>::max() + 1 == ZERO_CHANNEL_ID - ChannelId::MAX_CHANNEL_ID, "");
+ static_assert(ZERO_CHANNEL_ID + 1 == -ChatId::MAX_CHAT_ID);
+ static_assert(ZERO_SECRET_CHAT_ID + std::numeric_limits<int32>::max() + 1 ==
+ ZERO_CHANNEL_ID - ChannelId::MAX_CHANNEL_ID);
static_assert(ZERO_CHANNEL_ID - ChannelId::MIN_MONOFORUM_CHANNEL_ID + 1 ==
- ZERO_SECRET_CHAT_ID + std::numeric_limits<int32>::min(),
- "");
+ ZERO_SECRET_CHAT_ID + std::numeric_limits<int32>::min());
if (id < 0) {
if (-ChatId::MAX_CHAT_ID <= id) {
return DialogType::Chat;
diff --git a/td/telegram/DialogManager.cpp b/td/telegram/DialogManager.cpp
index 578704380..7de4fb638 100644
--- a/td/telegram/DialogManager.cpp
+++ b/td/telegram/DialogManager.cpp
@@ -111,8 +111,7 @@ class CheckChannelUsernameQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::bots_checkUsername::ReturnType,
- telegram_api::channels_checkUsername::ReturnType>::value,
- "");
+ telegram_api::channels_checkUsername::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::channels_checkUsername>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -251,8 +250,7 @@ class EditDialogTitleQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_editChatTitle::ReturnType,
- telegram_api::channels_editTitle::ReturnType>::value,
- "");
+ telegram_api::channels_editTitle::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_editChatTitle>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -316,8 +314,7 @@ class EditDialogPhotoQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_editChatPhoto::ReturnType,
- telegram_api::channels_editPhoto::ReturnType>::value,
- "");
+ telegram_api::channels_editPhoto::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_editChatPhoto>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -665,8 +662,7 @@ class UpdatePeerSettingsQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_reportSpam::ReturnType,
- telegram_api::messages_hidePeerSettingsBar::ReturnType>::value,
- "");
+ telegram_api::messages_hidePeerSettingsBar::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_reportSpam>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -1068,7 +1064,7 @@ class ToggleDialogIsBlockedQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(
- std::is_same<telegram_api::contacts_block::ReturnType, telegram_api::contacts_unblock::ReturnType>::value, "");
+ std::is_same<telegram_api::contacts_block::ReturnType, telegram_api::contacts_unblock::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::contacts_block>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp
index ef422201a..363f0a762 100644
--- a/td/telegram/MessageEntity.cpp
+++ b/td/telegram/MessageEntity.cpp
@@ -59,7 +59,7 @@ int MessageEntity::get_type_priority(Type type) {
99 /*CustomEmoji*/,
0 /*ExpandableBlockQuote*/,
30 /*FormattedDate*/};
- static_assert(sizeof(priorities) / sizeof(priorities[0]) == static_cast<size_t>(MessageEntity::Type::Size), "");
+ static_assert(sizeof(priorities) / sizeof(priorities[0]) == static_cast<size_t>(MessageEntity::Type::Size));
return priorities[static_cast<int32>(type)];
}
diff --git a/td/telegram/MessageQueryManager.cpp b/td/telegram/MessageQueryManager.cpp
index 110d6095e..549cf8167 100644
--- a/td/telegram/MessageQueryManager.cpp
+++ b/td/telegram/MessageQueryManager.cpp
@@ -321,8 +321,7 @@ class EditMessageFactCheckQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_deleteFactCheck::ReturnType,
- telegram_api::messages_editFactCheck::ReturnType>::value,
- "");
+ telegram_api::messages_editFactCheck::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_editFactCheck>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp
index 05ab5cf51..7265cc787 100644
--- a/td/telegram/MessagesManager.cpp
+++ b/td/telegram/MessagesManager.cpp
@@ -937,17 +937,13 @@ class SearchMessagesQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_getUnreadMentions::ReturnType,
- telegram_api::messages_search::ReturnType>::value,
- "");
+ telegram_api::messages_search::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getUnreadReactions::ReturnType,
- telegram_api::messages_search::ReturnType>::value,
- "");
+ telegram_api::messages_search::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getUnreadPollVotes::ReturnType,
- telegram_api::messages_search::ReturnType>::value,
- "");
+ telegram_api::messages_search::ReturnType>::value);
static_assert(
- std::is_same<telegram_api::messages_getReplies::ReturnType, telegram_api::messages_search::ReturnType>::value,
- "");
+ std::is_same<telegram_api::messages_getReplies::ReturnType, telegram_api::messages_search::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_search>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/ReactionManager.cpp b/td/telegram/ReactionManager.cpp
index 31db79fd9..261e99632 100644
--- a/td/telegram/ReactionManager.cpp
+++ b/td/telegram/ReactionManager.cpp
@@ -91,11 +91,9 @@ class GetReactionListQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_getRecentReactions::ReturnType,
- telegram_api::messages_getTopReactions::ReturnType>::value,
- "");
+ telegram_api::messages_getTopReactions::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getRecentReactions::ReturnType,
- telegram_api::messages_getDefaultTagReactions::ReturnType>::value,
- "");
+ telegram_api::messages_getDefaultTagReactions::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_getRecentReactions>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/Requests.cpp b/td/telegram/Requests.cpp
index 509b86c76..d6e28c014 100644
--- a/td/telegram/Requests.cpp
+++ b/td/telegram/Requests.cpp
@@ -2029,34 +2029,30 @@ Promise<SentEmailCode> Requests::create_sent_email_code_request_promise(uint64 i
#define CREATE_REQUEST_PROMISE() auto promise = create_request_promise<std::decay_t<decltype(request)>::ReturnType>(id)
-#define CREATE_OK_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::ok>>::value, ""); \
+#define CREATE_OK_REQUEST_PROMISE() \
+ static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::ok>>::value); \
auto promise = create_ok_request_promise(id)
-#define CREATE_TEXT_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::text>>::value, \
- ""); \
+#define CREATE_TEXT_REQUEST_PROMISE() \
+ static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::text>>::value); \
auto promise = create_text_request_promise(id)
-#define CREATE_DATA_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::data>>::value, \
- ""); \
+#define CREATE_DATA_REQUEST_PROMISE() \
+ static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::data>>::value); \
auto promise = create_data_request_promise(id)
-#define CREATE_HTTP_URL_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::httpUrl>>::value, \
- ""); \
+#define CREATE_HTTP_URL_REQUEST_PROMISE() \
+ static_assert( \
+ std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::httpUrl>>::value); \
auto promise = create_http_url_request_promise(id)
-#define CREATE_COUNT_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::count>>::value, \
- ""); \
+#define CREATE_COUNT_REQUEST_PROMISE() \
+ static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, td_api::object_ptr<td_api::count>>::value); \
auto promise = create_count_request_promise(id)
-#define CREATE_SENT_EMAIL_CODE_REQUEST_PROMISE() \
- static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, \
- td_api::object_ptr<td_api::emailAddressAuthenticationCodeInfo>>::value, \
- ""); \
+#define CREATE_SENT_EMAIL_CODE_REQUEST_PROMISE() \
+ static_assert(std::is_same<std::decay_t<decltype(request)>::ReturnType, \
+ td_api::object_ptr<td_api::emailAddressAuthenticationCodeInfo>>::value); \
auto promise = create_sent_email_code_request_promise(id)
void Requests::on_request(uint64 id, const td_api::setTdlibParameters &request) {
diff --git a/td/telegram/SecretChatActor.cpp b/td/telegram/SecretChatActor.cpp
index d24993b8c..0f7e29acb 100644
--- a/td/telegram/SecretChatActor.cpp
+++ b/td/telegram/SecretChatActor.cpp
@@ -1800,8 +1800,7 @@ Status SecretChatActor::on_update_chat(telegram_api::encryptedChatDiscarded &upd
Status SecretChatActor::on_update_chat(NetQueryPtr query) {
static_assert(std::is_same<telegram_api::messages_requestEncryption::ReturnType,
- telegram_api::messages_acceptEncryption::ReturnType>::value,
- "");
+ telegram_api::messages_acceptEncryption::ReturnType>::value);
TRY_RESULT(config, fetch_result<telegram_api::messages_requestEncryption>(std::move(query)));
TRY_STATUS(on_update_chat(std::move(config)));
if (auth_state_.state == State::WaitRequestResponse) {
diff --git a/td/telegram/StarManager.cpp b/td/telegram/StarManager.cpp
index cdbf93094..8c09137c5 100644
--- a/td/telegram/StarManager.cpp
+++ b/td/telegram/StarManager.cpp
@@ -212,8 +212,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::payments_getStarsTransactionsByID::ReturnType,
- telegram_api::payments_getStarsTransactions::ReturnType>::value,
- "");
+ telegram_api::payments_getStarsTransactions::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::payments_getStarsTransactions>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp
index bd99bf548..45f8a4ee5 100644
--- a/td/telegram/StickersManager.cpp
+++ b/td/telegram/StickersManager.cpp
@@ -92,11 +92,9 @@ class GetAllStickersQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_getMaskStickers::ReturnType,
- telegram_api::messages_getAllStickers::ReturnType>::value,
- "");
+ telegram_api::messages_getAllStickers::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getEmojiStickers::ReturnType,
- telegram_api::messages_getAllStickers::ReturnType>::value,
- "");
+ telegram_api::messages_getAllStickers::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_getAllStickers>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -370,8 +368,7 @@ class GetFeaturedStickerSetsQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_getFeaturedStickers::ReturnType,
- telegram_api::messages_getFeaturedEmojiStickers::ReturnType>::value,
- "");
+ telegram_api::messages_getFeaturedEmojiStickers::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_getFeaturedStickers>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -858,8 +855,7 @@ class SearchStickerSetsQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_searchStickerSets::ReturnType,
- telegram_api::messages_searchEmojiStickerSets::ReturnType>::value,
- "");
+ telegram_api::messages_searchEmojiStickerSets::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_searchStickerSets>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -1137,8 +1133,7 @@ class AddStickerToSetQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::stickers_addStickerToSet::ReturnType,
- telegram_api::stickers_replaceSticker::ReturnType>::value,
- "");
+ telegram_api::stickers_replaceSticker::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::stickers_addStickerToSet>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -1491,14 +1486,11 @@ class GetEmojiGroupsQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::messages_getEmojiGroups::ReturnType,
- telegram_api::messages_getEmojiStatusGroups::ReturnType>::value,
- "");
+ telegram_api::messages_getEmojiStatusGroups::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getEmojiGroups::ReturnType,
- telegram_api::messages_getEmojiProfilePhotoGroups::ReturnType>::value,
- "");
+ telegram_api::messages_getEmojiProfilePhotoGroups::ReturnType>::value);
static_assert(std::is_same<telegram_api::messages_getEmojiGroups::ReturnType,
- telegram_api::messages_getEmojiStickerGroups::ReturnType>::value,
- "");
+ telegram_api::messages_getEmojiStickerGroups::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::messages_getEmojiGroups>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
@@ -1542,14 +1534,11 @@ class GetDefaultDialogPhotoEmojisQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::account_getDefaultProfilePhotoEmojis::ReturnType,
- telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value,
- "");
+ telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value);
static_assert(std::is_same<telegram_api::account_getDefaultBackgroundEmojis::ReturnType,
- telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value,
- "");
+ telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value);
static_assert(std::is_same<telegram_api::account_getChannelRestrictedStatusEmojis::ReturnType,
- telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value,
- "");
+ telegram_api::account_getDefaultGroupPhotoEmojis::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::account_getDefaultGroupPhotoEmojis>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/td/telegram/UserManager.cpp b/td/telegram/UserManager.cpp
index 5b5d027cb..1b9b12e36 100644
--- a/td/telegram/UserManager.cpp
+++ b/td/telegram/UserManager.cpp
@@ -549,14 +549,11 @@ class UploadProfilePhotoQuery final : public Td::ResultHandler {
only_suggest_ = only_suggest;
static_assert(static_cast<int32>(telegram_api::photos_uploadProfilePhoto::VIDEO_MASK) ==
- static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::VIDEO_MASK),
- "");
+ static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::VIDEO_MASK));
static_assert(static_cast<int32>(telegram_api::photos_uploadProfilePhoto::VIDEO_START_TS_MASK) ==
- static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::VIDEO_START_TS_MASK),
- "");
+ static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::VIDEO_START_TS_MASK));
static_assert(static_cast<int32>(telegram_api::photos_uploadProfilePhoto::FILE_MASK) ==
- static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::FILE_MASK),
- "");
+ static_cast<int32>(telegram_api::photos_uploadContactProfilePhoto::FILE_MASK));
int32 flags = 0;
telegram_api::object_ptr<telegram_api::InputFile> photo_input_file;
@@ -636,8 +633,7 @@ class UploadProfilePhotoQuery final : public Td::ResultHandler {
void on_result(BufferSlice packet) final {
static_assert(std::is_same<telegram_api::photos_uploadProfilePhoto::ReturnType,
- telegram_api::photos_uploadContactProfilePhoto::ReturnType>::value,
- "");
+ telegram_api::photos_uploadContactProfilePhoto::ReturnType>::value);
auto result_ptr = fetch_result<telegram_api::photos_uploadProfilePhoto>(packet);
if (result_ptr.is_error()) {
return on_error(result_ptr.move_as_error());
diff --git a/tdutils/td/utils/StealingQueue.h b/tdutils/td/utils/StealingQueue.h
index c923cb92e..cbbba4f99 100644
--- a/tdutils/td/utils/StealingQueue.h
+++ b/tdutils/td/utils/StealingQueue.h
@@ -17,7 +17,7 @@ namespace td {
template <class T, size_t N = 256>
class StealingQueue {
public:
- static_assert(N > 0 && (N & (N - 1)) == 0, "");
+ static_assert(N > 0 && (N & (N - 1)) == 0);
// tries to put a value
// returns if succeeded
diff --git a/tdutils/td/utils/WaitFreeHashMap.h b/tdutils/td/utils/WaitFreeHashMap.h
index 576564c88..6235a2ec7 100644
--- a/tdutils/td/utils/WaitFreeHashMap.h
+++ b/tdutils/td/utils/WaitFreeHashMap.h
@@ -17,7 +17,7 @@ namespace td {
template <class KeyT, class ValueT, class HashT = Hash<KeyT>, class EqT = std::equal_to<KeyT>>
class WaitFreeHashMap {
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
- static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
+ static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0);
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 12;
FlatHashMap<KeyT, ValueT, HashT, EqT> default_map_;
diff --git a/tdutils/td/utils/WaitFreeHashSet.h b/tdutils/td/utils/WaitFreeHashSet.h
index 1c21329ff..f90ccbde7 100644
--- a/tdutils/td/utils/WaitFreeHashSet.h
+++ b/tdutils/td/utils/WaitFreeHashSet.h
@@ -17,7 +17,7 @@ namespace td {
template <class KeyT, class HashT = Hash<KeyT>, class EqT = std::equal_to<KeyT>>
class WaitFreeHashSet {
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
- static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
+ static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0);
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 12;
FlatHashSet<KeyT, HashT, EqT> default_set_;
diff --git a/tdutils/td/utils/crypto.cpp b/tdutils/td/utils/crypto.cpp
index 01fc1ff7a..8b8f85a93 100644
--- a/tdutils/td/utils/crypto.cpp
+++ b/tdutils/td/utils/crypto.cpp
@@ -312,8 +312,8 @@ struct AesBlock {
#endif
}
};
-static_assert(sizeof(AesBlock) == 16, "");
-static_assert(sizeof(AesBlock) == AES_BLOCK_SIZE, "");
+static_assert(sizeof(AesBlock) == 16);
+static_assert(sizeof(AesBlock) == AES_BLOCK_SIZE);
class Evp {
public: