dupe: Avoid O(n) operations in dupe_files_add_queue_cb()
authorFrej Drejhammar <frej.drejhammar@gmail.com>
Sat, 13 Feb 2021 15:54:24 +0000 (16:54 +0100)
committerFrej Drejhammar <frej.drejhammar@gmail.com>
Sat, 27 Mar 2021 11:49:19 +0000 (12:49 +0100)
commit5eab9b5f7815fa579b7c53dd8c1c17e9651ff18b
treecca63dea627a18f49f63ef314dcda83586dd2769
parent6fcc1f605927429d306621ed6af31bdaed1036b5
dupe: Avoid O(n) operations in dupe_files_add_queue_cb()

Replace tests that use g_list_length(), which traverses the list with
simple constant-time NULL checks. That an empty list is NULL is
documented in the GList documentation.
src/dupe.c