diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-01-07 20:20:57 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-01-22 20:45:19 (GMT) |
commit | cc0baded768470a2569e71a08aafce791db83205 (patch) | |
tree | 60ca28e13692d5acf58cc47a33c056be51a41221 /addon | |
parent | 98ef388068684c3226f96c67776bc8d91b0a9dd1 (diff) | |
download | Doxygen-cc0baded768470a2569e71a08aafce791db83205.zip Doxygen-cc0baded768470a2569e71a08aafce791db83205.tar.gz Doxygen-cc0baded768470a2569e71a08aafce791db83205.tar.bz2 |
Refactoring: modernize MemberList
Diffstat (limited to 'addon')
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 1181231..dde9eb1 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -258,13 +258,11 @@ void cModule(const ClassDef* cd) { if (ml) { const FileDef *fd = cd->getFileDef(); const MemberList *fd_ml = fd->getMemberList(MemberListType_allMembersList); - if (!fd_ml || fd_ml->count() == 0) { + if (!fd_ml || fd_ml->size() == 0) { printModule(fd->getOutputFileBase().data()); printDefines(); } - MemberListIterator mli(*ml); - const MemberDef* md; - for (mli.toFirst(); (md=mli.current()); ++mli) { + for (const auto &md : *ml) { printDefinition("variable", cd->name().data() + std::string("::") + md->name().data(), md->getDefLine()); protectionInformation(md->protection()); } @@ -336,9 +334,7 @@ static void lookupSymbol(const Definition *d) { void listMembers(const MemberList *ml) { if (ml) { - MemberListIterator mli(*ml); - const MemberDef *md; - for (mli.toFirst(); (md=mli.current()); ++mli) { + for (const auto &md : *ml) { lookupSymbol((Definition*) md); } } @@ -407,7 +403,7 @@ static void listSymbols() { for (const auto &fd : *fn) { printFile(fd->absFilePath().data()); MemberList *ml = fd->getMemberList(MemberListType_allMembersList); - if (ml && ml->count() > 0) { + if (ml && ml->size() > 0) { printModule(fd->getOutputFileBase().data()); printDefines(); listMembers(ml); |