From 49120f48474fc8fdc2448c75d961bc238213cfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 1 May 2018 14:34:32 +0200 Subject: New upstream version 0.28.2 --- src/SortedList.vala | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/SortedList.vala') diff --git a/src/SortedList.vala b/src/SortedList.vala index 00672ab..20e6771 100644 --- a/src/SortedList.vala +++ b/src/SortedList.vala @@ -6,22 +6,6 @@ public delegate int64 Comparator(void *a, void *b); -extern string g_utf8_collate_key_for_filename(string str, ssize_t len = -1); - -public int64 file_comparator(void *a, void *b) { - string? path_a = ((File *) a)->get_path(); - string? path_b = ((File *) b)->get_path(); - - // if both are null, treat as equal; if one but not the other, prioritize the non-null - if (path_a == null) - return (path_b == null) ? 0 : 1; - - if (path_b == null) - return -1; - - return strcmp(g_utf8_collate_key_for_filename(path_a), g_utf8_collate_key_for_filename(path_b)); -} - public class SortedList : Object, Gee.Traversable, Gee.Iterable, Gee.Collection { private Gee.ArrayList list; private unowned Comparator? cmp; -- cgit v1.2.3