summaryrefslogtreecommitdiffstats
path: root/src/index.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-12 18:13:32 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-10-12 18:13:32 (GMT)
commit86904d5b9752d35ff83bab14969314913f945d5b (patch)
treea205b9d8b40af012479b532e708766ec57e37a1f /src/index.cpp
parentc23cedcb1ff27094ea661776b783942d485669ef (diff)
downloadDoxygen-86904d5b9752d35ff83bab14969314913f945d5b.zip
Doxygen-86904d5b9752d35ff83bab14969314913f945d5b.tar.gz
Doxygen-86904d5b9752d35ff83bab14969314913f945d5b.tar.bz2
Refactoring: Modernize BaseClassList
Diffstat (limited to 'src/index.cpp')
-rw-r--r--src/index.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/index.cpp b/src/index.cpp
index 4df2ce4..e46a578 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -451,14 +451,13 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
//----------------------------------------------------------------------------
/*! Generates HTML Help tree of classes */
-static void writeClassTree(OutputList &ol,const BaseClassList *bcl,bool hideSuper,int level,FTVHelp* ftv,bool addToIndex)
+static void writeClassTree(OutputList &ol,BaseClassList bcl,bool hideSuper,int level,FTVHelp* ftv,bool addToIndex)
{
- if (bcl==0) return;
- BaseClassListIterator bcli(*bcl);
+ if (bcl.empty()) return;
bool started=FALSE;
- for ( ; bcli.current() ; ++bcli)
+ for (const auto &bcd : bcl)
{
- ClassDef *cd=bcli.current()->classDef;
+ ClassDef *cd=bcd.classDef;
if (cd->getLanguage()==SrcLangExt_VHDL && (VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
{
continue;
@@ -513,7 +512,7 @@ static void writeClassTree(OutputList &ol,const BaseClassList *bcl,bool hideSupe
{
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- ftv->addContentsItem(hasChildren,bcli.current()->usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
+ ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
}
else
{
@@ -963,7 +962,7 @@ static int countClassesInTreeList(const ClassSDict &cl, ClassDef::CompoundType c
{
if (cd->isVisibleInHierarchy()) // should it be visible
{
- if (cd->subClasses()) // should have sub classes
+ if (!cd->subClasses().empty()) // should have sub classes
{
count++;
}