summaryrefslogtreecommitdiffstats
path: root/src/classdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-08-22 19:30:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-08-22 19:30:14 (GMT)
commit20bc00a80ad6bcda730a1762c3700c8f63fa16eb (patch)
treee5faa5e8d675f525b1cd2f397645136f8193b36f /src/classdef.cpp
parent4ad0d24c5b3a0afd99722ae5c33968ff9fa44e2d (diff)
downloadDoxygen-20bc00a80ad6bcda730a1762c3700c8f63fa16eb.zip
Doxygen-20bc00a80ad6bcda730a1762c3700c8f63fa16eb.tar.gz
Doxygen-20bc00a80ad6bcda730a1762c3700c8f63fa16eb.tar.bz2
Release-1.7.1-20100822
Diffstat (limited to 'src/classdef.cpp')
-rw-r--r--src/classdef.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 5911b35..04f8934 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2163,7 +2163,7 @@ bool ClassDef::hasDocumentation() const
bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
{
bool found=FALSE;
- //printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data());
+ //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
if (level>256)
{
err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(name()),qPrint(bcd->name()));
@@ -2172,20 +2172,18 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
}
if (baseClasses())
{
- //BaseClassListIterator bcli(*baseClasses());
- //for ( ; bcli.current() && !found ; ++bcli)
- BaseClassDef *bcdi = baseClasses()->first();
- while (bcdi)
+ // Beware: trying to optimise the iterator away using ->first() & ->next()
+ // causes bug 625531
+ BaseClassListIterator bcli(*baseClasses());
+ for ( ; bcli.current() && !found ; ++bcli)
{
- //ClassDef *ccd=bcli.current()->classDef;
- ClassDef *ccd=bcdi->classDef;
+ ClassDef *ccd=bcli.current()->classDef;
if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
//printf("isBaseClass() baseclass %s\n",ccd->name().data());
if (ccd==bcd)
found=TRUE;
else
found=ccd->isBaseClass(bcd,followInstances,level+1);
- bcdi = baseClasses()->next();
}
}
return found;