From e2b07563dd9cc21f8472570d2cc8d6cd69d536b8 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 17 Sep 2018 12:12:26 +0200 Subject: C++11 features used in Doxygen - corrected some initializations - corrected some missing, new, cases (reported by travis CI) --- src/docbookgen.cpp | 7 +++++++ src/docbookgen.h | 16 ++++++++-------- src/htmlgen.cpp | 4 ++++ src/index.cpp | 7 +++++++ src/tagreader.cpp | 4 ++++ 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp index 785dee8..bfec8bf 100644 --- a/src/docbookgen.cpp +++ b/src/docbookgen.cpp @@ -2406,6 +2406,13 @@ DB_GEN_C //m_indent=0; //templateMemberItem = FALSE; m_prettyCode=Config_getBool(DOCBOOK_PROGRAMLISTING); + m_denseText = FALSE; + m_inGroup = FALSE; + m_inDetail = FALSE; + m_levelListItem = 0; + m_descTable = FALSE; + m_inLevel = -1; + m_firstMember = FALSE; for (int i = 0 ; i < sizeof(m_inListItem) / sizeof(*m_inListItem) ; i++) m_inListItem[i] = FALSE; for (int i = 0 ; i < sizeof(m_inSimpleSect) / sizeof(*m_inSimpleSect) ; i++) m_inSimpleSect[i] = FALSE; } diff --git a/src/docbookgen.h b/src/docbookgen.h index 3fafff1..104fbc5 100644 --- a/src/docbookgen.h +++ b/src/docbookgen.h @@ -350,16 +350,16 @@ private: QCString relPath; DocbookCodeGenerator m_codeGen; - bool m_prettyCode = FALSE; - bool m_denseText = FALSE; - bool m_inGroup = FALSE; - bool m_inDetail = FALSE; - int m_levelListItem = 0; + bool m_prettyCode; + bool m_denseText; + bool m_inGroup; + bool m_inDetail; + int m_levelListItem; bool m_inListItem[20]; bool m_inSimpleSect[20]; - bool m_descTable = FALSE; - int m_inLevel = -1; - bool m_firstMember = FALSE; + bool m_descTable; + int m_inLevel; + bool m_firstMember; }; #endif diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 8819078..f0f627c 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -17,6 +17,7 @@ #include +#include #include #include #include "message.h" @@ -2056,6 +2057,9 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind) case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0; //case LayoutNavEntry::Dirs: return documentedDirs>0; case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0; + case LayoutNavEntry::None: // should never happen, means not properly initialized + assert(kind != LayoutNavEntry::None); + return FALSE; } return FALSE; } diff --git a/src/index.cpp b/src/index.cpp index 503387c..8be6b24 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -4308,6 +4309,9 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList0; //case LayoutNavEntry::Dirs: return documentedDirs>0; case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0; + case LayoutNavEntry::None: // should never happen, means not properly initialized + assert(kind != LayoutNavEntry::None); + return FALSE; } return FALSE; } diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 82e4712..942c55b 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -18,6 +18,7 @@ #include "tagreader.h" +#include #include #include @@ -1322,6 +1323,9 @@ void TagFileParser::buildLists(Entry *root) case TagClassInfo::Category: ce->spec = Entry::Category; break; case TagClassInfo::Service: ce->spec = Entry::Service; break; case TagClassInfo::Singleton: ce->spec = Entry::Singleton; break; + case TagClassInfo::None: // should never happen, means not properly initialized + assert(tci->kind != TagClassInfo::None); + break; } ce->name = tci->name; if (tci->kind==TagClassInfo::Protocol) -- cgit v0.12