2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Replace t_assert() with Assert().

Also use this assertions for Expects(), Ensures() and Unexpected().
This commit is contained in:
John Preston
2017-08-17 12:06:26 +03:00
parent b3da99c302
commit 25ffaaaa2d
107 changed files with 492 additions and 435 deletions

View File

@@ -430,7 +430,7 @@ DeleteMessagesBox::DeleteMessagesBox(QWidget*, HistoryItem *item, bool suggestMo
DeleteMessagesBox::DeleteMessagesBox(QWidget*, const SelectedItemSet &selected) {
auto count = selected.size();
t_assert(count > 0);
Assert(count > 0);
_ids.reserve(count);
for_const (auto item, selected) {
_ids.push_back(item->fullId());
@@ -440,7 +440,7 @@ DeleteMessagesBox::DeleteMessagesBox(QWidget*, const SelectedItemSet &selected)
void DeleteMessagesBox::prepare() {
auto text = QString();
if (_moderateFrom) {
t_assert(_moderateInChannel != nullptr);
Assert(_moderateInChannel != nullptr);
text = lang(lng_selected_delete_sure_this);
if (_moderateBan) {
_banUser.create(this, lang(lng_ban_user), false, st::defaultBoxCheckbox);