summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/util.cpp b/src/util.cpp
index e223da2..1f7bef8 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -2616,7 +2616,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
fd=0, md=0, cd=0, nd=0, gd=0;
if (memberName.isEmpty()) return FALSE; /* empty name => nothing to link */
- QCString scopeName=scName.copy();
+ QCString scopeName=scName;
//printf("Search for name=%s args=%s in scope=%s\n",
// memberName.data(),args,scopeName.data());
@@ -2707,7 +2707,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{
delete argList; argList=0;
}
- if (mdist==maxInheritanceDepth && args && strcmp(args,"()")!=0)
+ if (mdist==maxInheritanceDepth && args && strcmp(args,"()")==0)
// no exact match found, but if args="()" an arbitrary member will do
{
//printf(" >Searching for arbitrary member\n");
@@ -3023,8 +3023,9 @@ bool resolveRef(/* in */ const char *scName,
QCString fullName = substitute(tsName,"#","::");
fullName = removeRedundantWhiteSpace(substitute(fullName,".","::"));
- int scopePos=fullName.findRev("::");
int bracePos=fullName.findRev('('); // reverse is needed for operator()(...)
+ int endNamePos=bracePos!=-1 ? bracePos : fullName.length();
+ int scopePos=fullName.findRev("::",endNamePos);
// default result values
*resContext=0;
@@ -3063,22 +3064,15 @@ bool resolveRef(/* in */ const char *scName,
// continue search...
}
- // extract scope
- QCString scopeStr=scName;
-
//printf("scopeContext=%s scopeUser=%s\n",scopeContext.data(),scopeUser.data());
// extract userscope+name
- int endNamePos=bracePos!=-1 ? bracePos : fullName.length();
QCString nameStr=fullName.left(endNamePos);
// extract arguments
QCString argsStr;
if (bracePos!=-1) argsStr=fullName.right(fullName.length()-bracePos);
- //printf("scope=`%s' name=`%s' arg=`%s'\n",
- // scopeStr.data(),nameStr.data(),argsStr.data());
-
// strip template specifier
// TODO: match against the correct partial template instantiation
int templPos=nameStr.find('<');
@@ -3088,6 +3082,8 @@ bool resolveRef(/* in */ const char *scName,
nameStr=nameStr.left(templPos)+nameStr.right(nameStr.length()-endTemplPos-1);
}
+ QCString scopeStr=scName;
+
MemberDef *md = 0;
ClassDef *cd = 0;
FileDef *fd = 0;