CtrlLib: ArrayCtrl new Sort variant

git-svn-id: svn://ultimatepp.org/upp/trunk@1968 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-01-28 09:49:12 +00:00
parent e7fe6eec1b
commit ff9af34cd7
2 changed files with 9 additions and 2 deletions

View file

@ -2261,10 +2261,15 @@ struct ArrayCtrl::RowOrder : public ArrayCtrl::Order {
}
};
void ArrayCtrl::Sort(int (*compare)(const Vector<Value>& v1, const Vector<Value>& v2)) {
void ArrayCtrl::Sort(int from, int count, int (*compare)(const Vector<Value>& v1, const Vector<Value>& v2))
{
RowOrder io;
io.compare = compare;
Sort(io);
Sort(from, count, io);
}
void ArrayCtrl::Sort(int (*compare)(const Vector<Value>& v1, const Vector<Value>& v2)) {
Sort(0, GetCount(), compare);
}
struct ArrayCtrl::ItemOrder : public ArrayCtrl::Order {