diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index bd92b923b..23002f145 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -250,7 +250,7 @@ void PeerListBox::peerListSetSearchMode(PeerListSearchMode mode) { void PeerListBox::peerListSortRows(base::lambda compare) { _inner->reorderRows([compare = std::move(compare)](auto &&begin, auto &&end) { - std::sort(begin, end, [&compare](auto &&a, auto &&b) { + std::sort(begin, end, [compare](auto &&a, auto &&b) { return compare(*a, *b); }); }); @@ -258,7 +258,7 @@ void PeerListBox::peerListSortRows(base::lambda border) { _inner->reorderRows([border = std::move(border)](auto &&begin, auto &&end) { - std::stable_partition(begin, end, [&border](auto &¤t) { + std::stable_partition(begin, end, [border](auto &¤t) { return border(*current); }); });