Skip to content

Commit f33248f

Browse files
committed
Reference to non existing anchor with "More..."
When having an anonymous struct, the `More ...` in the detailed description points to a non existing page and anchor. We can see this with e.g.: ``` /// \file class test { public: struct { double s2_time; //!< \brief brief time in secs //!< \details details time in secs } s2_temp; }; ``` the correction is analogous to the correction for writing the name.
1 parent e5712aa commit f33248f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/memberdef.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,19 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
24702470
ol.pushGeneratorState();
24712471
ol.disableAllBut(OutputGenerator::Html);
24722472
ol.docify(" ");
2473-
ol.startTextLink(getOutputFileBase(),anchor());
2473+
MemberDefMutable *annMemb = NULL;
2474+
if (!isAnonymous()) // hide anonymous stuff
2475+
{
2476+
annMemb = toMemberDefMutable(m_impl->annMemb);
2477+
}
2478+
if (annMemb)
2479+
{
2480+
ol.startTextLink(annMemb->getOutputFileBase(),annMemb->anchor());
2481+
}
2482+
else
2483+
{
2484+
ol.startTextLink(getOutputFileBase(),anchor());
2485+
}
24742486
ol.parseText(theTranslator->trMore());
24752487
ol.endTextLink();
24762488
ol.popGeneratorState();

0 commit comments

Comments
 (0)