summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2007-09-25 19:13:15 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2007-09-25 19:13:15 (GMT)
commitf57b7d974fec18d1d8f325c102efd8be5930131d (patch)
treebbe4c051e635c620ab57fcc7ca8279d0427777d8 /src/util.cpp
parent8e4a092e4d51347f8f6c61d87154ee74edb13d20 (diff)
downloadDoxygen-f57b7d974fec18d1d8f325c102efd8be5930131d.zip
Doxygen-f57b7d974fec18d1d8f325c102efd8be5930131d.tar.gz
Doxygen-f57b7d974fec18d1d8f325c102efd8be5930131d.tar.bz2
Release-1.5.3-20070925
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 7338a9e..8466b28 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -826,11 +826,17 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
Definition *itemScope=item->getOuterScope();
- if (itemScope==scope ||
- (item->definitionType()==Definition::TypeMember &&
- itemScope && itemScope->definitionType()==Definition::TypeClass &&
- scope->definitionType()==Definition::TypeClass &&
- ((ClassDef*)scope)->isAccessibleMember((MemberDef *)item)
+ if (
+ itemScope==scope || // same thing
+ (item->definitionType()==Definition::TypeMember && // a member
+ itemScope && itemScope->definitionType()==Definition::TypeClass && // of a class
+ scope->definitionType()==Definition::TypeClass && // accessible
+ ((ClassDef*)scope)->isAccessibleMember((MemberDef *)item) // from scope
+ ) ||
+ (item->definitionType()==Definition::TypeClass && // a nested class
+ itemScope && itemScope->definitionType()==Definition::TypeClass && // inside a base
+ scope->definitionType()==Definition::TypeClass && // class of scope
+ ((ClassDef*)scope)->isBaseClass((ClassDef*)itemScope,TRUE)
)
)
{
@@ -915,7 +921,11 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,
QCString key(40+explicitScopePart.length());
key.sprintf("%p:%p:%p:%s",scope,fileScope,item,explicitScopePart.data());
static QDict<void> visitedDict;
- if (visitedDict.find(key)) return -1; // already looked at this
+ if (visitedDict.find(key))
+ {
+ //printf("Already visited!\n");
+ return -1; // already looked at this
+ }
visitedDict.insert(key,(void *)0x8);
//printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>",