diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-05 17:53:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-09 18:47:45 (GMT) |
commit | 075229e586b391c3ec7ad79597aaeae392ca64e5 (patch) | |
tree | 2ad99929371727ad0811a55e597fa81a70ba43a7 /src/fortrancode.l | |
parent | 6922d5d63d77c8f640c58e9c68a9955f9f0aa9a7 (diff) | |
download | Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.zip Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.tar.gz Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.tar.bz2 |
Refactoring: Introduce immutable and mutable interfaces
Split Definition/ClassDef/NamespaceDef/MemberDef into a immutable and mutable part
Aliases are immutable, other symbols are stored using an immutable
interface but can be made mutable explicitly by dynamic casting.
Diffstat (limited to 'src/fortrancode.l')
-rw-r--r-- | src/fortrancode.l | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l index f8f246a..39dc721 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -297,7 +297,11 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?") } if (yyextra->currentMemberDef && yyextra->currentMemberDef->isFunction()) { - yyextra->currentMemberDef->incrementFlowKeyWordCount(); + MemberDefMutable *mdm = MemberDef::make_mutable(yyextra->currentMemberDef); + if (mdm) + { + mdm->incrementFlowKeyWordCount(); + } } /* font class is defined e.g. in doxygen.css */ startFontClass(yyscanner,"keywordflow"); @@ -1233,7 +1237,7 @@ static bool getLink(yyscan_t yyscanner,UseSDict *usedict, // dictionary with use if (yyextra->currentDefinition && yyextra->currentMemberDef && md!=yyextra->currentMemberDef && yyextra->insideBody && yyextra->collectXRefs) { - addDocCrossReference(yyextra->currentMemberDef,md); + addDocCrossReference(MemberDef::make_mutable(yyextra->currentMemberDef),MemberDef::make_mutable(md)); } writeMultiLineCodeLink(yyscanner,ol,md,text ? text : memberText); addToSearchIndex(yyscanner, text ? text : memberText); |