> +                     match = tag->type & q->type;
> +
> +             /* Remove tag from the results. tags are unowned so removing is 
> easy */
> +             if (!match)
> +                     g_queue_unlink(&res, node);
> +     }
> +
> +     /* Convert GQueue to GPtrArray for sort, dedup and return */
> +     i = 0;
> +     ret = g_ptr_array_sized_new(g_queue_get_length(&res));
> +     foreach_list(node, res.head)
> +     {
> +             tag = (TMTag *) node->data;
> +             g_ptr_array_insert(ret, i++, tag);
> +     }
> +     g_list_free(res.head);

why use a list to then convert it?  looks like a better job to direct 
`GPtrArray` + `tm_tags_prune()`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1187/files/386006313a0b78c614bd1ac522ac121e093df58d#r75773134

Reply via email to