From c4264a8317caf3a5813adc2bc5ddb755595e6481 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 13 May 2011 13:30:07 +0000 Subject: [PATCH] Fix the comparison function in the list control sample to do what it says. The comment in the function implied that it exchanged the items but in fact it did not and kept their existing order instead. Do revert them now, at least like this something visibly happens in the sample when the items are sorted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index b9539d55b0..0536b20076 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -74,9 +74,9 @@ MyCompareFunction(wxIntPtr item1, wxIntPtr item2, wxIntPtr WXUNUSED(sortData)) { // inverse the order if (item1 < item2) - return -1; - if (item1 > item2) return 1; + if (item1 > item2) + return -1; return 0; } -- 2.50.0