[Github-comments] [geany/geany] New tagmanager query module (#1187)
Colomban Wendling
notifications at xxxxx
Mon Aug 22 22:43:21 UTC 2016
> + {
> + tags = tm_tags_find(q->workspace->tags_array, s->str, s->len, &ntags);
> + foreach_c_array(ptag, tags, ntags)
> + g_queue_insert_sorted(&res, *ptag, tag_compare_ptr, &sort_options);
> + }
> + }
> +
> + /* Filter tags according to scope, type and lang. */
> + for (node = res.head; node; node = next)
> + {
> + gboolean match = TRUE;
> +
> + next = node->next;
> + tag = node->data;
> + foreach_ptr_array(scope, i, q->scopes)
> + match = match && (g_strcmp0(tag->scope, scope) == 0);
as you seem worried about speed, better break out early when match becomes false, as it will just keep being false on and on
--
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#r75772842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160822/beaabe32/attachment.html>
More information about the Github-comments
mailing list