mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
UniquePointer > std_::unique_ptr, MakeUnique > std_::make_unique.
This commit is contained in:
@@ -72,8 +72,8 @@ ContactsInner::ContactsInner(ChatData *chat, MembersFilter membersFilter) : TWid
|
||||
, _aboutWidth(st::boxWideWidth - st::contactsPadding.left() - st::contactsPadding.right() - st::contactsCheckPosition.x() * 2 - st::contactsCheckIcon.pxWidth())
|
||||
, _aboutAllAdmins(st::boxTextFont, lang(lng_chat_about_all_admins), _defaultOptions, _aboutWidth)
|
||||
, _aboutAdmins(st::boxTextFont, lang(lng_chat_about_admins), _defaultOptions, _aboutWidth)
|
||||
, _customList((membersFilter == MembersFilterRecent) ? UniquePointer<Dialogs::IndexedList>() : MakeUnique<Dialogs::IndexedList>(Dialogs::SortMode::Add))
|
||||
, _contacts((membersFilter == MembersFilterRecent) ? App::main()->contactsList() : _customList.data())
|
||||
, _customList((membersFilter == MembersFilterRecent) ? std_::unique_ptr<Dialogs::IndexedList>() : std_::make_unique<Dialogs::IndexedList>(Dialogs::SortMode::Add))
|
||||
, _contacts((membersFilter == MembersFilterRecent) ? App::main()->contactsList() : _customList.get())
|
||||
, _addContactLnk(this, lang(lng_add_contact_button)) {
|
||||
initList();
|
||||
if (membersFilter == MembersFilterAdmins) {
|
||||
@@ -89,8 +89,8 @@ ContactsInner::ContactsInner(UserData *bot) : TWidget()
|
||||
, _rowHeight(st::contactsPadding.top() + st::contactsPhotoSize + st::contactsPadding.bottom())
|
||||
, _bot(bot)
|
||||
, _allAdmins(this, lang(lng_chat_all_members_admins), false, st::contactsAdminCheckbox)
|
||||
, _customList(MakeUnique<Dialogs::IndexedList>(Dialogs::SortMode::Add))
|
||||
, _contacts(_customList.data())
|
||||
, _customList(std_::make_unique<Dialogs::IndexedList>(Dialogs::SortMode::Add))
|
||||
, _contacts(_customList.get())
|
||||
, _addContactLnk(this, lang(lng_add_contact_button)) {
|
||||
auto v = App::main()->dialogsList();
|
||||
for_const (auto row, *v) {
|
||||
|
@@ -147,7 +147,7 @@ private:
|
||||
|
||||
int32 _time;
|
||||
|
||||
UniquePointer<Dialogs::IndexedList> _customList;
|
||||
std_::unique_ptr<Dialogs::IndexedList> _customList;
|
||||
Dialogs::IndexedList *_contacts = nullptr;
|
||||
Dialogs::Row *_sel = nullptr;
|
||||
QString _filter;
|
||||
|
Reference in New Issue
Block a user