From: Vadim Zeitlin Date: Fri, 13 May 2011 13:30:07 +0000 (+0000) Subject: Fix the comparison function in the list control sample to do what it says. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c4264a8317caf3a5813adc2bc5ddb755595e6481 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 --- 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; }