Fix updating symbol list for overloaded C++ symbols
When searching for an old entry to reuse when updating an existing symbol list, take into account the symbol's argument list not to always match the same entry for overloaded symbols. Closes #3406644. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5910 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
5d687aad27
commit
aace32fb69
@ -1,3 +1,10 @@
|
||||
2011-09-12 Colomban Wendling <colomban(at)geany(dot)org>
|
||||
|
||||
* src/symbols.c:
|
||||
Fix updating symbol list for overloaded C++ symbols (closes
|
||||
#3406644).
|
||||
|
||||
|
||||
2011-09-02 Colomban Wendling <colomban(at)geany(dot)org>
|
||||
|
||||
* src/ui_utils.c:
|
||||
|
@ -1191,7 +1191,9 @@ static gboolean tag_equal(gconstpointer v1, gconstpointer v2)
|
||||
const TMTag *t2 = v2;
|
||||
|
||||
return (t1->type == t2->type && strcmp(t1->name, t2->name) == 0 &&
|
||||
utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope));
|
||||
utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope) &&
|
||||
/* include arglist in match to support e.g. C++ overloading */
|
||||
utils_str_equal(t1->atts.entry.arglist, t2->atts.entry.arglist));
|
||||
}
|
||||
|
||||
|
||||
@ -1210,6 +1212,12 @@ static guint tag_hash(gconstpointer v)
|
||||
for (p = tag->atts.entry.scope; *p != '\0'; p++)
|
||||
h = (h << 5) + h + *p;
|
||||
}
|
||||
/* for e.g. C++ overloading */
|
||||
if (tag->atts.entry.arglist)
|
||||
{
|
||||
for (p = tag->atts.entry.arglist; *p != '\0'; p++)
|
||||
h = (h << 5) + h + *p;
|
||||
}
|
||||
|
||||
return h;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user