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.
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(dw->extra_label));
- if (g_list_length(queue) == 0)
+ if (queue == NULL)
{
dw->add_files_queue_id = 0;
g_idle_add(dupe_check_start_cb, dw);
dw->list = g_list_prepend(dw->list, di);
}
- if (g_list_length(dw->add_files_queue) > 0)
+ if (dw->add_files_queue != NULL)
{
return TRUE;
}