diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-23 12:07:03 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-23 12:07:03 (GMT) |
commit | bf5c2ac20e42f440ae0199d4d809b9d5e7e22191 (patch) | |
tree | b4d2a77dfec1d6dcc57543d065ac5ce8ce648824 /src/perlmodgen.cpp | |
parent | 9bf7658013e49dabaafb818a639b5ca62f845538 (diff) | |
download | Doxygen-bf5c2ac20e42f440ae0199d4d809b9d5e7e22191.zip Doxygen-bf5c2ac20e42f440ae0199d4d809b9d5e7e22191.tar.gz Doxygen-bf5c2ac20e42f440ae0199d4d809b9d5e7e22191.tar.bz2 |
Refactoring: replaced getNamespaceSDict() by getNamespaces()
Diffstat (limited to 'src/perlmodgen.cpp')
-rw-r--r-- | src/perlmodgen.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 24f7482..918f39e 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1966,6 +1966,7 @@ void PerlModGenerator::generatePerlModForNamespace(const NamespaceDef *nd) m_output.openHash() .addFieldQuotedString("name", nd->name()); + if (!nd->getClasses().empty()) { m_output.openList("classes"); for (const auto &cd : nd->getClasses()) @@ -1975,13 +1976,10 @@ void PerlModGenerator::generatePerlModForNamespace(const NamespaceDef *nd) m_output.closeList(); } - const NamespaceSDict *nl = nd->getNamespaceSDict(); - if (nl) + if (!nd->getNamespaces().empty()) { m_output.openList("namespaces"); - NamespaceSDict::Iterator nli(*nl); - const NamespaceDef *ind; - for (nli.toFirst();(ind=nli.current());++nli) + for (const auto &ind : nd->getNamespaces()) m_output.openHash() .addFieldQuotedString("name", ind->name()) .closeHash(); @@ -2108,6 +2106,7 @@ void PerlModGenerator::generatePerlModForGroup(const GroupDef *gd) m_output.closeList(); } + if (!gd->getClasses().empty()) { m_output.openList("classes"); for (const auto &cd : gd->getClasses()) @@ -2117,13 +2116,10 @@ void PerlModGenerator::generatePerlModForGroup(const GroupDef *gd) m_output.closeList(); } - NamespaceSDict *nl = gd->getNamespaces(); - if (nl) + if (!gd->getNamespaces().empty()) { m_output.openList("namespaces"); - NamespaceSDict::Iterator nli(*nl); - const NamespaceDef *nd; - for (nli.toFirst();(nd=nli.current());++nli) + for (const auto &nd : gd->getNamespaces()) m_output.openHash() .addFieldQuotedString("name", nd->name()) .closeHash(); |