diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
commit | 709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch) | |
tree | 496b2f3899e1d5728ee9ae76095cc5056c317447 /src/SortedList.vala | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/SortedList.vala')
-rw-r--r-- | src/SortedList.vala | 16 |
1 files changed, 0 insertions, 16 deletions
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<G> : Object, Gee.Traversable<G>, Gee.Iterable<G>, Gee.Collection<G> { private Gee.ArrayList<G> list; private unowned Comparator? cmp; |