[Github-comments] [geany/geany] Enable local variables for C/C++ and improve autocompletion (PR #3185)

Jiří Techet notifications at github.com
Sun May 1 20:38:42 UTC 2022


@techee commented on this pull request.



> +		!(tag->type & tm_tag_local_var_t) &&
+		is_autocomplete_tag(tag, info);
+}
+
+
+static guint copy_tags(GPtrArray *dst, TMTag **src, guint src_len, GHashTable *name_table,
+	gint num, gboolean (*predicate) (TMTag *, CopyInfo *), CopyInfo *info)
+{
+	guint i;
+
+	g_return_val_if_fail(src && dst, 0);
+
+	for (i = 0; i < src_len && num > 0; i++)
+	{
+		TMTag *tag = *src;
+		if (predicate(tag, info) &&

Call over pointer doesn't matter at all, it's still the same function in the loop and the processor will handle it for free. Having to compare scope for local variables is another story - with local variables enabled we get 3x more tags than before and eliminating the comparison early by checking whether we are in the right file definitely helps.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3185#discussion_r862518997
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3185/review/958628439 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220501/70642ffa/attachment.htm>


More information about the Github-comments mailing list