diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-10-28 20:56:03 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-10-29 21:54:21 (GMT) |
commit | d38df57916d5902abc9dbaf5891c14898ce675da (patch) | |
tree | e546dc1ab7076ec0726259ebed973130af9e83ec /src/groupdef.cpp | |
parent | 94e8899c8013cf99a6f90d1c8f0a7815ccc3e1c3 (diff) | |
download | Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.zip Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.tar.gz Doxygen-d38df57916d5902abc9dbaf5891c14898ce675da.tar.bz2 |
Replaced QList<Grouping> with std::vector<Grouping>
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r-- | src/groupdef.cpp | 51 |
1 files changed, 19 insertions, 32 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp index bcdb3d0..882cebd 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -1460,12 +1460,10 @@ void GroupDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *current void addClassToGroups(const Entry *root,ClassDef *cd) { - QListIterator<Grouping> gli(*root->groups); - Grouping *g; - for (;(g=gli.current());++gli) + for (const Grouping &g : root->groups) { GroupDef *gd=0; - if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname))) + if (!g.groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g.groupname))) { if (gd->addClass(cd)) { @@ -1478,14 +1476,12 @@ void addClassToGroups(const Entry *root,ClassDef *cd) void addNamespaceToGroups(const Entry *root,NamespaceDef *nd) { - //printf("root->groups->count()=%d\n",root->groups->count()); - QListIterator<Grouping> gli(*root->groups); - Grouping *g; - for (;(g=gli.current());++gli) + //printf("root->groups.size()=%d\n",root->groups.size()); + for (const Grouping &g : root->groups) { GroupDef *gd=0; //printf("group '%s'\n",s->data()); - if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname))) + if (!g.groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g.groupname))) { if (gd->addNamespace(nd)) nd->makePartOfGroup(gd); //printf("Namespace %s: in group %s\n",nd->name().data(),s->data()); @@ -1495,14 +1491,12 @@ void addNamespaceToGroups(const Entry *root,NamespaceDef *nd) void addDirToGroups(const Entry *root,DirDef *dd) { - //printf("*** root->groups->count()=%d\n",root->groups->count()); - QListIterator<Grouping> gli(*root->groups); - Grouping *g; - for (;(g=gli.current());++gli) + //printf("*** root->groups.size()=%d\n",root->groups.size()); + for (const Grouping &g : root->groups) { GroupDef *gd=0; //printf("group '%s'\n",g->groupname.data()); - if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname))) + if (!g.groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g.groupname))) { gd->addDir(dd); dd->makePartOfGroup(gd); @@ -1513,14 +1507,11 @@ void addDirToGroups(const Entry *root,DirDef *dd) void addGroupToGroups(const Entry *root,GroupDef *subGroup) { - //printf("addGroupToGroups for %s groups=%d\n",root->name.data(), - // root->groups?root->groups->count():-1); - QListIterator<Grouping> gli(*root->groups); - Grouping *g; - for (;(g=gli.current());++gli) + //printf("addGroupToGroups for %s groups=%d\n",root->name.data(),root->groups.size()); + for (const Grouping &g : root->groups) { GroupDef *gd=0; - if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname))) + if (!g.groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g.groupname))) { if (gd==subGroup) { @@ -1546,20 +1537,18 @@ void addMemberToGroups(const Entry *root,MemberDef *md) { //printf("addMemberToGroups: Root %p = %s, md %p=%s groups=%d\n", // root, root->name.data(), md, md->name().data(), root->groups->count() ); - QListIterator<Grouping> gli(*root->groups); - Grouping *g; // Search entry's group list for group with highest pri. Grouping::GroupPri_t pri = Grouping::GROUPING_LOWEST; GroupDef *fgd=0; - for (;(g=gli.current());++gli) + for (const Grouping &g : root->groups) { GroupDef *gd=0; - if (!g->groupname.isEmpty() && - (gd=Doxygen::groupSDict->find(g->groupname)) && - g->pri >= pri) + if (!g.groupname.isEmpty() && + (gd=Doxygen::groupSDict->find(g.groupname)) && + g.pri >= pri) { - if (fgd && gd!=fgd && g->pri==pri) + if (fgd && gd!=fgd && g.pri==pri) { warn(root->fileName.data(), root->startLine, "Member %s found in multiple %s groups! " @@ -1570,7 +1559,7 @@ void addMemberToGroups(const Entry *root,MemberDef *md) } fgd = gd; - pri = g->pri; + pri = g.pri; } } //printf("fgd=%p\n",fgd); @@ -1650,12 +1639,10 @@ void addMemberToGroups(const Entry *root,MemberDef *md) void addExampleToGroups(const Entry *root,PageDef *eg) { - QListIterator<Grouping> gli(*root->groups); - Grouping *g; - for (;(g=gli.current());++gli) + for (const Grouping &g : root->groups) { GroupDef *gd=0; - if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname))) + if (!g.groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g.groupname))) { gd->addExample(eg); eg->makePartOfGroup(gd); |