[Vala] sorting arraylist
- From: Pavol Klačanský <pavol klacansky com>
- To: vala-list gnome org
- Subject: [Vala] sorting arraylist
- Date: Thu, 04 Aug 2011 13:40:05 +0200
Hi,
is this deprecated? if so, what should I use, or shoudl I write sort of
my own
sort_with_data((CompareDataFunc) sort_func_items);
and why this cannot be in object as method?
int sort_func_items(Item item1, Item item2) {
if (item1._date < item2._date) {
return 1;
}
else if (item1._date == item2._date) {
return 0;
}
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]