summaryrefslogtreecommitdiff
path: root/src/Thumbnail.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/Thumbnail.vala')
-rw-r--r--src/Thumbnail.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Thumbnail.vala b/src/Thumbnail.vala
index f47fc69..51d2612 100644
--- a/src/Thumbnail.vala
+++ b/src/Thumbnail.vala
@@ -169,14 +169,15 @@ public class Thumbnail : MediaSourceItem {
}
public static int64 exposure_time_ascending_comparator(void *a, void *b) {
- int64 time_a = (int64) (((Thumbnail *) a)->media.get_exposure_time());
- int64 time_b = (int64) (((Thumbnail *) b)->media.get_exposure_time());
- int64 result = (time_a - time_b);
+ var time_a = (((Thumbnail *) a)->media.get_exposure_time());
+ var time_b = (((Thumbnail *) b)->media.get_exposure_time());
+
+ var result = nullsafe_date_time_comperator(time_a, time_b);
return (result != 0) ? result : filename_ascending_comparator(a, b);
}
- public static int64 exposure_time_desending_comparator(void *a, void *b) {
+ public static int64 exposure_time_descending_comparator(void *a, void *b) {
int64 result = exposure_time_ascending_comparator(b, a);
return (result != 0) ? result : filename_descending_comparator(a, b);