1
0
Fork 0

GUI: remove unused ColumnCompare class from StdTable

This commit is contained in:
Duncan Ogilvie 2018-01-08 22:16:24 +01:00
parent 73b30ed49b
commit aec262b88a
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 1 additions and 24 deletions

View File

@ -36,30 +36,7 @@ protected:
duint userdata = 0;
};
class ColumnCompare
{
public:
ColumnCompare(int col, bool greater, SortBy::t fn)
{
mCol = col;
mGreater = greater;
mSortFn = fn;
}
inline bool operator()(const std::vector<CellData> & a, const std::vector<CellData> & b) const
{
bool less = mSortFn(a.at(mCol).text, b.at(mCol).text);
if(mGreater)
return !less;
return less;
}
private:
int mCol;
int mGreater;
SortBy::t mSortFn;
};
std::vector<std::vector<CellData>> mData; //listof(row) where row = (listof(col) where col = string)
std::vector<std::vector<CellData>> mData; //listof(row) where row = (listof(col) where col = CellData)
std::vector<SortBy::t> mColumnSortFunctions;
};