Ticket #3184: filezilla-02-vector-begin.diff
File filezilla-02-vector-begin.diff, 2.2 KB (added by , 17 years ago) |
---|
-
trunk/src/interface/RemoteListView.cpp
1017 1017 // Simply reverse everything 1018 1018 m_sortDirection = direction; 1019 1019 m_sortColumn = column; 1020 std::reverse(++m_indexMapping.begin(), m_indexMapping.end()); 1020 std::vector<unsigned int>::iterator iter; 1021 iter = m_indexMapping.begin(); 1022 std::reverse(++iter, m_indexMapping.end()); 1021 1023 1022 1024 SortList_UpdateSelections(selected, focused); 1023 1025 delete [] selected; … … 1053 1055 break; 1054 1056 } 1055 1057 1058 std::vector<unsigned int>::iterator iter; 1059 iter = m_indexMapping.begin(); 1056 1060 if (!m_sortColumn) 1057 std::sort(++ m_indexMapping.begin(), m_indexMapping.end(), CRemoteListViewSortName(m_pDirectoryListing, dirSortMode));1061 std::sort(++iter, m_indexMapping.end(), CRemoteListViewSortName(m_pDirectoryListing, dirSortMode)); 1058 1062 else if (m_sortColumn == 1) 1059 std::sort(++ m_indexMapping.begin(), m_indexMapping.end(), CRemoteListViewSortSize(m_pDirectoryListing, dirSortMode));1063 std::sort(++iter, m_indexMapping.end(), CRemoteListViewSortSize(m_pDirectoryListing, dirSortMode)); 1060 1064 else if (m_sortColumn == 2) 1061 std::sort(++ m_indexMapping.begin(), m_indexMapping.end(), CRemoteListViewSortType(this, dirSortMode, m_pDirectoryListing, m_fileData));1065 std::sort(++iter, m_indexMapping.end(), CRemoteListViewSortType(this, dirSortMode, m_pDirectoryListing, m_fileData)); 1062 1066 else if (m_sortColumn == 3) 1063 std::sort(++ m_indexMapping.begin(), m_indexMapping.end(), CRemoteListViewSortTime(m_pDirectoryListing, dirSortMode));1067 std::sort(++iter, m_indexMapping.end(), CRemoteListViewSortTime(m_pDirectoryListing, dirSortMode)); 1064 1068 else if (m_sortColumn == 4) 1065 std::sort(++ m_indexMapping.begin(), m_indexMapping.end(), CRemoteListViewSortPermissions(m_pDirectoryListing, dirSortMode));1069 std::sort(++iter, m_indexMapping.end(), CRemoteListViewSortPermissions(m_pDirectoryListing, dirSortMode)); 1066 1070 1071 iter = m_indexMapping.begin(); 1067 1072 if (m_sortDirection) 1068 std::reverse(++ m_indexMapping.begin(), m_indexMapping.end());1073 std::reverse(++iter, m_indexMapping.end()); 1069 1074 1070 1075 SortList_UpdateSelections(selected, focused); 1071 1076 delete [] selected;