diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-06-10 14:32:16 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-06-10 14:32:16 (GMT) |
commit | 6bcfa2ef74dee5be64110aa0b06b368d498c9a73 (patch) | |
tree | e7d24c06a9c225fe4a29004a178cc28a435cdc67 /src/util.cpp | |
parent | c2107e15c87bc0b964d333e24ec193c1a2d27335 (diff) | |
download | Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.zip Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.tar.gz Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.tar.bz2 |
Release-1.2.8.1
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util.cpp b/src/util.cpp index cf8ab4c..c4b2606 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1830,7 +1830,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, return TRUE; /* found match */ } } - /* goto the parent scope */ + /* go to the parent scope */ if (scopeOffset==0) { @@ -2650,18 +2650,16 @@ QCString convertNameToFile(const char *name,bool allowDots) void extractNamespaceName(const QCString &scopeName, QCString &className,QCString &namespaceName) { - QCString clName=scopeName.copy(); - //QCString nsName; + int i,p; + QCString clName=scopeName; NamespaceDef *nd = 0; if (!clName.isEmpty() && (nd=getResolvedNamespace(clName)) && getClass(clName)==0) { // the whole name is a namespace (and not a class) namespaceName=nd->name().copy(); className.resize(0); - //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(), - // className.data(),namespaceName.data()); - return; + goto done; } - int i,p=clName.length()-2; + p=clName.length()-2; while (p>=0 && (i=clName.findRev("::",p))!=-1) // see if the first part is a namespace (and not a class) { @@ -2669,14 +2667,16 @@ void extractNamespaceName(const QCString &scopeName, { namespaceName=nd->name().copy(); className=clName.right(clName.length()-i-2); - //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(), - // className.data(),namespaceName.data()); - return; + goto done; } p=i-2; // try a smaller piece of the scope } + + // not found, so we just have to guess. className=scopeName.copy(); namespaceName.resize(0); + +done: //printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(), // className.data(),namespaceName.data()); return; |