[Github-comments] [geany] Store "equal" tags into binary trees instead of lists in Symbol tree (#797)
Colomban Wendling
notifications at xxxxx
Tue Dec 22 17:16:53 UTC 2015
> {
> - GList *node;
> - foreach_list(node, *list)
> - g_slice_free(GtkTreeIter, node->data);
> - g_list_free(*list);
> - g_slice_free1(sizeof *list, list);
> + TreeSearchData user_data = {-1, line, TRUE};
> +
> + /* search parent candidates for the one with the nearest
> + * line number which is lower than the tag's line number */
> + g_tree_search(tree, (GCompareFunc)tree_search_func, &user_data);
> + parent_search = g_tree_lookup(tree, GINT_TO_POINTER(user_data.found_line));
same, shouldn't this be only done if search matched?
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/797/files#r48275413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151222/b1c5bf2e/attachment.html>
More information about the Github-comments
mailing list