diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-07-22 15:19:56 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-07-22 15:19:56 (GMT) |
commit | 185d6abdc832e7dd66183a2154a13a546414b96f (patch) | |
tree | 2e37e5d4a6d3250e5b0d5ca02c3e57ba4458ed41 /src/commentscan.l | |
parent | 982fce9e021e5359ec2572cbbb815a47bc822e70 (diff) | |
download | Doxygen-185d6abdc832e7dd66183a2154a13a546414b96f.zip Doxygen-185d6abdc832e7dd66183a2154a13a546414b96f.tar.gz Doxygen-185d6abdc832e7dd66183a2154a13a546414b96f.tar.bz2 |
Moved local toc data into a separate type for better encapsulation
Diffstat (limited to 'src/commentscan.l')
-rw-r--r-- | src/commentscan.l | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index f6cf099..c364312 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2897,26 +2897,22 @@ static bool handleToc(const QCString &, const QCString &opt) { if (opt == "html") { - current->localToc |= (1 << Definition::Html); - current->localTocLevel[Definition::Html] = level; + current->localToc.enableHtml(level); } else if (opt == "latex") { - current->localToc |= (1 << Definition::Latex); - current->localTocLevel[Definition::Latex] = level; + current->localToc.enableLatex(level); } else if (opt == "xml") { - current->localToc |= (1 << Definition::Xml); - current->localTocLevel[Definition::Xml] = level; + current->localToc.enableXml(level); } else warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data()); } } - if (current->localToc == Definition::None) + if (current->localToc.nothingEnabled()) { - current->localToc |= (1 << Definition::Html); - current->localTocLevel[Definition::Html] = 5; + current->localToc.enableHtml(5); // for backward compatibility } } return FALSE; |