2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

UniquePointer > std_::unique_ptr, MakeUnique > std_::make_unique.

This commit is contained in:
John Preston
2016-04-10 23:20:48 +04:00
parent dd1d04e9b0
commit 460e2ec0ac
29 changed files with 214 additions and 177 deletions

View File

@@ -509,7 +509,7 @@ bool MainWidget::onShareUrl(const PeerId &peer, const QString &url, const QStrin
return false;
}
History *h = App::history(peer);
h->setMsgDraft(MakeUnique<HistoryDraft>(url + '\n' + text, 0, MessageCursor(url.size() + 1, url.size() + 1 + text.size(), QFIXED_MAX), false));
h->setMsgDraft(std_::make_unique<HistoryDraft>(url + '\n' + text, 0, MessageCursor(url.size() + 1, url.size() + 1 + text.size(), QFIXED_MAX), false));
h->clearEditDraft();
bool opened = history.peer() && (history.peer()->id == peer);
if (opened) {
@@ -527,7 +527,7 @@ bool MainWidget::onInlineSwitchChosen(const PeerId &peer, const QString &botAndQ
return false;
}
History *h = App::history(peer);
h->setMsgDraft(MakeUnique<HistoryDraft>(botAndQuery, 0, MessageCursor(botAndQuery.size(), botAndQuery.size(), QFIXED_MAX), false));
h->setMsgDraft(std_::make_unique<HistoryDraft>(botAndQuery, 0, MessageCursor(botAndQuery.size(), botAndQuery.size(), QFIXED_MAX), false));
h->clearEditDraft();
bool opened = history.peer() && (history.peer()->id == peer);
if (opened) {