diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2001-06-10 14:32:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2001-06-10 14:32:16 (GMT) |
commit | df80e2787c543a3b48f775fbd5c18723abe64a07 (patch) | |
tree | e7d24c06a9c225fe4a29004a178cc28a435cdc67 /src/util.cpp | |
parent | fcea664faa6475ff88208a719b50390b686e8930 (diff) | |
download | Doxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.zip Doxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.tar.gz Doxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.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; |