summaryrefslogtreecommitdiff
path: root/src/mangen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mangen.cpp')
-rw-r--r--src/mangen.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 256dd67..27484ce 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -690,11 +690,14 @@ void ManGenerator::endParamList()
{
}
-void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
+void ManGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
{
- ManDocVisitor *visitor = new ManDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
- n->accept(visitor);
- delete visitor;
+ const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST *>(ast);
+ if (astImpl)
+ {
+ auto visitor { ManDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString("")) };
+ std::visit(visitor,astImpl->root);
+ }
m_firstCol=FALSE;
m_paragraph = FALSE;
}