From 023b07ca13263a9d6d50ffa806d5aad35e31c869 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 22 Feb 2020 16:12:15 +0100 Subject: Cleanup code --- src/definition.cpp | 2 +- src/index.cpp | 3 +-- src/section.h | 4 +++- src/xmlgen.cpp | 3 --- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/definition.cpp b/src/definition.cpp index c67030e..00f2bc5 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -432,7 +432,7 @@ void DefinitionImpl::addSectionsToDefinition(const std::vectorsectionDict ? m_impl->sectionDict->count() : 0); + // m_impl->sectionRefs.size()); if (m_impl->sectionRefs.empty()) return FALSE; for (const SectionInfo *si : m_impl->sectionRefs) { diff --git a/src/index.cpp b/src/index.cpp index 2234377..5552ff0 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4556,8 +4556,7 @@ static void writeIndex(OutputList &ol) ol.startTextBlock(); ol.generateDoc(defFileName,defLine,Doxygen::mainPage,0, - Doxygen::mainPage->documentation(),TRUE,FALSE - /*,Doxygen::mainPage->sectionDict*/); + Doxygen::mainPage->documentation(),TRUE,FALSE); ol.endTextBlock(); ol.endPageDoc(); diff --git a/src/section.h b/src/section.h index 2c24e8d..daee254 100644 --- a/src/section.h +++ b/src/section.h @@ -115,7 +115,8 @@ class SectionRefs const_iterator begin() const { return m_entries.cbegin(); } const_iterator end() const { return m_entries.cend(); } - bool empty() const { return m_lookup.empty(); } + bool empty() const { return m_entries.empty(); } + int size() const { return m_entries.size(); } private: SectionInfoVec m_entries; @@ -176,6 +177,7 @@ class SectionManager iterator begin() { return m_entries.begin(); } iterator end() { return m_entries.end(); } bool empty() const { return m_entries.empty(); } + int size() const { return m_entries.size(); } //! clears the sections void clear() diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 7a72346..d674ed8 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1835,12 +1835,9 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) if (pd->localToc().isXmlEnabled() && !sectionRefs.empty()) { t << " " << endl; - //SDict::Iterator li(*sectionDict); - //SectionInfo *si; int level=1,l; bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE }; int maxLevel = pd->localToc().xmlLevel(); - //for (li.toFirst();(si=li.current());++li) for (const SectionInfo *si : sectionRefs) { if (isSection(si->type())) -- cgit v0.12