From 0c4f569f6567c29d04b814f0cf52690717d3a898 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Fri, 8 Dec 2017 15:50:44 +0300 Subject: [PATCH] Fix error c2100 invalid inderection against visual c++ 19.12 (visual studio 15.5) --- Telegram/SourceFiles/boxes/peer_list_box.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }); });