[Github-comments] [geany] Store "equal" tags into binary trees instead of lists in Symbol tree (#797)

Colomban Wendling notifications at xxxxx
Sun Feb 28 22:30:48 UTC 2016


>  		{
> -			if (((GList *) node->data)->data == tag)
> -				break;
> +			GList *node;
> +			/* should always be the first element as we returned the first one in
> +			 * tags_table_lookup() */
> +			foreach_list(node, list)
> +			{
> +				if (((GList *) node->data)->data == tag)
> +					break;
> +			}
> +			list = g_list_delete_link(list, node);
> +			g_tree_insert(tree, GINT_TO_POINTER(tag->line), list);

shouldn't the entry be removed if `list==NULL` like it used to do?

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/797/files#r54357906
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160228/5985267a/attachment.html>


More information about the Github-comments mailing list