b4n commented on this pull request.
> GTree *tree;
- if (g_hash_table_lookup_extended(table, tag->name, NULL, (gpointer *)
&tree) &&
- ! utils_str_equal(parent_name, tag->name) /* prevent Foo::Foo
from making parent = child */)
+
+ if (EMPTY(tag->scope))
+ {
+ /* simple case, just use the tag name */
+ name = tag->name;
That was a vain attempt at over-optimization to avoid memory allocation in the
simple case. And it'd need profiling, but it might be worth it as it's likely
to be the most common case (root scope symbol and no duplicate). But if it
just adds complexity for the reader I'll drop it.
--
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/1598#discussion_r140639530