Skip to content

Commit 886cf1c

Browse files
committed
Refactoring: code formatting and fix coverity warnings
1 parent 84eda2f commit 886cf1c

19 files changed

+161
-161
lines changed

src/classdef.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,9 @@ void ClassDefImpl::writeBriefDescription(OutputList &ol,bool exampleFlag) const
15691569
this,
15701570
nullptr,
15711571
briefDescription(),
1572-
DocOptions().
1573-
setIndexWords(true).
1574-
setSingleLine(true));
1572+
DocOptions()
1573+
.setIndexWords(true)
1574+
.setSingleLine(true));
15751575
ol.pushGeneratorState();
15761576
ol.disable(OutputType::RTF);
15771577
ol.writeString(" \n");
@@ -1625,8 +1625,8 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
16251625
this,
16261626
nullptr,
16271627
documentation(),
1628-
DocOptions().
1629-
setIndexWords(true));
1628+
DocOptions()
1629+
.setIndexWords(true));
16301630
}
16311631
// write type constraints
16321632
writeTypeConstraints(ol,this,m_typeConstraints);
@@ -1636,8 +1636,8 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
16361636
this,
16371637
nullptr, // memberDef
16381638
inlineTemplateArgListToDoc(m_tempArgs), // docStr
1639-
DocOptions().
1640-
setIndexWords(true));
1639+
DocOptions()
1640+
.setIndexWords(true));
16411641

16421642
// write examples
16431643
if (hasExamples())
@@ -2708,8 +2708,8 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCStrin
27082708
this,
27092709
nullptr,
27102710
briefDescription(),
2711-
DocOptions().
2712-
setSingleLine(true))
2711+
DocOptions()
2712+
.setSingleLine(true))
27132713
};
27142714
if (!ast->isEmpty())
27152715
{

src/commentscan.l

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3515,11 +3515,11 @@ static QCString fileInfoLookup(const FileInfo &fi,const std::string &optionName)
35153515
static std::unordered_map<std::string,OptionFunc> options =
35163516
{
35173517
// name, function producing the value
3518-
{ "name", [](const FileInfo &fi_) { return fi_.baseName(); } },
3519-
{ "extension", [](const FileInfo &fi_) { return fi_.extension(true); } },
3520-
{ "filename", [](const FileInfo &fi_) { return fi_.fileName(); } },
3521-
{ "directory", [](const FileInfo &fi_) { return fi_.dirPath(); } },
3522-
{ "full", [](const FileInfo &fi_) { return fi_.absFilePath(); } }
3518+
{ "name", [](const FileInfo &fi_) -> QCString { return fi_.baseName(); } },
3519+
{ "extension", [](const FileInfo &fi_) -> QCString { return fi_.extension(true); } },
3520+
{ "filename", [](const FileInfo &fi_) -> QCString { return fi_.fileName(); } },
3521+
{ "directory", [](const FileInfo &fi_) -> QCString { return fi_.dirPath(); } },
3522+
{ "full", [](const FileInfo &fi_) -> QCString { return fi_.absFilePath(); } }
35233523
};
35243524
auto it = options.find(optionName);
35253525
return (it!=options.end()) ? it->second(fi) : QCString();

src/conceptdef.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ void ConceptDefImpl::writeBriefDescription(OutputList &ol) const
332332
this,
333333
nullptr,
334334
briefDescription(),
335-
DocOptions().
336-
setIndexWords(true).
337-
setSingleLine(true))
335+
DocOptions()
336+
.setIndexWords(true)
337+
.setSingleLine(true))
338338
};
339339
if (!ast->isEmpty())
340340
{
@@ -498,8 +498,8 @@ void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &tit
498498
this,
499499
nullptr,
500500
documentation(),
501-
DocOptions().
502-
setIndexWords(true));
501+
DocOptions()
502+
.setIndexWords(true));
503503
}
504504

505505
writeSourceDef(ol);
@@ -703,8 +703,8 @@ void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCStr
703703
this,
704704
nullptr,
705705
briefDescription(),
706-
DocOptions().
707-
setSingleLine(true))
706+
DocOptions()
707+
.setSingleLine(true))
708708
};
709709
if (!ast->isEmpty())
710710
{

src/definition.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,9 +1467,9 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
14671467
scope,
14681468
md,
14691469
docTitle,
1470-
DocOptions().
1471-
setIndexWords(true).
1472-
setSingleLine(true));
1470+
DocOptions()
1471+
.setIndexWords(true)
1472+
.setSingleLine(true));
14731473
ol.endTocEntry(si);
14741474
}
14751475
}

src/dirdef.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
278278
this,
279279
nullptr,
280280
documentation()+"\n",
281-
DocOptions().
282-
setIndexWords(true));
281+
DocOptions()
282+
.setIndexWords(true));
283283
}
284284
}
285285
}
@@ -296,8 +296,8 @@ void DirDefImpl::writeBriefDescription(OutputList &ol)
296296
this,
297297
nullptr,
298298
briefDescription(),
299-
DocOptions().
300-
setIndexWords(true))
299+
DocOptions()
300+
.setIndexWords(true))
301301
};
302302
if (!ast->isEmpty())
303303
{
@@ -402,9 +402,9 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
402402
dd,
403403
nullptr,
404404
dd->briefDescription(),
405-
DocOptions().
406-
setSingleLine(true).
407-
setLinkFromIndex(true));
405+
DocOptions()
406+
.setSingleLine(true)
407+
.setLinkFromIndex(true));
408408
ol.endMemberDescription();
409409
}
410410
ol.endMemberDeclaration(dd->anchor(),QCString());
@@ -488,9 +488,9 @@ void DirDefImpl::writeFileList(OutputList &ol)
488488
fd,
489489
nullptr,
490490
fd->briefDescription(),
491-
DocOptions().
492-
setSingleLine(true).
493-
setLinkFromIndex(true));
491+
DocOptions()
492+
.setSingleLine(true)
493+
.setLinkFromIndex(true));
494494
ol.endMemberDescription();
495495
}
496496
ol.endMemberDeclaration(fd->anchor(),QCString());

src/doxygen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9987,9 +9987,9 @@ static void generateExampleDocs()
99879987
nullptr, // memberDef
99889988
(pd->briefDescription().isEmpty()?"":pd->briefDescription()+"\n\n")+
99899989
pd->documentation()+"\n\n\\include"+lineNoOptStr+" "+pd->name(), // docs
9990-
DocOptions().
9991-
setIndexWords(true).
9992-
setExample(pd->name()));
9990+
DocOptions()
9991+
.setIndexWords(true)
9992+
.setExample(pd->name()));
99939993
endFile(*g_outputList); // contains g_outputList->endContents()
99949994
}
99959995
g_outputList->enable(OutputType::Man);

src/filedef.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
514514
this,
515515
nullptr,
516516
documentation()+"\n",
517-
DocOptions().
518-
setIndexWords(true));
517+
DocOptions()
518+
.setIndexWords(true));
519519
}
520520
//printf("Writing source ref for file %s\n",qPrint(name()));
521521
if (Config_getBool(SOURCE_BROWSER))
@@ -551,9 +551,9 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
551551
this,
552552
nullptr,
553553
briefDescription(),
554-
DocOptions().
555-
setIndexWords(true).
556-
setSingleLine(true))
554+
DocOptions()
555+
.setIndexWords(true)
556+
.setSingleLine(true))
557557
};
558558
if (!ast->isEmpty())
559559
{

src/ftvhelp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ static void generateBriefDoc(TextStream &t,const Definition *def)
339339
def,
340340
nullptr,
341341
brief,
342-
DocOptions().
343-
setSingleLine(true).
344-
setLinkFromIndex(true))
342+
DocOptions()
343+
.setSingleLine(true)
344+
.setLinkFromIndex(true))
345345
};
346346
const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
347347
if (astImpl)

src/groupdef.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,8 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
838838
this,
839839
nullptr,
840840
documentation()+"\n",
841-
DocOptions().
842-
setIndexWords(true));
841+
DocOptions()
842+
.setIndexWords(true));
843843
}
844844

845845
// write inbody documentation
@@ -850,8 +850,8 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
850850
this,
851851
nullptr,
852852
inbodyDocumentation()+"\n",
853-
DocOptions().
854-
setIndexWords(true));
853+
DocOptions()
854+
.setIndexWords(true));
855855
}
856856
}
857857
}
@@ -867,9 +867,9 @@ void GroupDefImpl::writeBriefDescription(OutputList &ol)
867867
this,
868868
nullptr,
869869
briefDescription(),
870-
DocOptions().
871-
setIndexWords(true).
872-
setSingleLine(true))
870+
DocOptions()
871+
.setIndexWords(true)
872+
.setSingleLine(true))
873873
};
874874
if (!ast->isEmpty())
875875
{
@@ -951,8 +951,8 @@ void GroupDefImpl::writeFiles(OutputList &ol,const QCString &title)
951951
fd,
952952
nullptr,
953953
fd->briefDescription(),
954-
DocOptions().
955-
setSingleLine(true));
954+
DocOptions()
955+
.setSingleLine(true));
956956
ol.endMemberDescription();
957957
}
958958
ol.endMemberDeclaration(QCString(),QCString());
@@ -997,8 +997,8 @@ void GroupDefImpl::writeNestedGroups(OutputList &ol,const QCString &title)
997997
gd,
998998
nullptr,
999999
gd->groupTitle(),
1000-
DocOptions().
1001-
setSingleLine(true));
1000+
DocOptions()
1001+
.setSingleLine(true));
10021002
ol.endIndexItem(gd->getReference(),gd->getOutputFileBase());
10031003
ol.endMemberItem(OutputGenerator::MemberItemType::Normal);
10041004
if (!gd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
@@ -1009,8 +1009,8 @@ void GroupDefImpl::writeNestedGroups(OutputList &ol,const QCString &title)
10091009
gd,
10101010
nullptr,
10111011
gd->briefDescription(),
1012-
DocOptions().
1013-
setSingleLine(true));
1012+
DocOptions()
1013+
.setSingleLine(true));
10141014
ol.endMemberDescription();
10151015
}
10161016
ol.endMemberDeclaration(QCString(),QCString());
@@ -1048,8 +1048,8 @@ void GroupDefImpl::writeDirs(OutputList &ol,const QCString &title)
10481048
dd,
10491049
nullptr,
10501050
dd->briefDescription(),
1051-
DocOptions().
1052-
setSingleLine(true));
1051+
DocOptions()
1052+
.setSingleLine(true));
10531053
ol.endMemberDescription();
10541054
}
10551055
ol.endMemberDeclaration(QCString(),QCString());
@@ -1103,8 +1103,8 @@ void GroupDefImpl::writePageDocumentation(OutputList &ol)
11031103
pd,
11041104
nullptr,
11051105
(pd->documentation()+pd->inbodyDocumentation()),
1106-
DocOptions().
1107-
setIndexWords(true));
1106+
DocOptions()
1107+
.setIndexWords(true));
11081108
ol.endTextBlock();
11091109
}
11101110
}
@@ -1248,10 +1248,10 @@ void GroupDefImpl::writeDocumentation(OutputList &ol)
12481248
this,
12491249
nullptr,
12501250
m_title,
1251-
DocOptions().
1252-
setIndexWords(true).
1253-
setSingleLine(true).
1254-
setAutolinkSupport(false));
1251+
DocOptions()
1252+
.setIndexWords(true)
1253+
.setSingleLine(true)
1254+
.setAutolinkSupport(false));
12551255
ol.popGeneratorState();
12561256
//1.}
12571257
addGroupListToTitle(ol,this);

src/htmlgen.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -623,20 +623,20 @@ static QCString substituteHtmlKeywords(const QCString &file,
623623
result = substituteKeywords(file,result,
624624
{
625625
// keyword value getter
626-
{ "$datetime", [&]() { return "<span class=\"datetime\"></span>"; } },
627-
{ "$date", [&]() { return "<span class=\"date\"></span>"; } },
628-
{ "$time", [&]() { return "<span class=\"time\"></span>"; } },
629-
{ "$year", [&]() { return "<span class=\"year\"></span>"; } },
630-
{ "$navpath", [&]() { return navPath; } },
631-
{ "$stylesheet", [&]() { return cssFile; } },
632-
{ "$treeview", [&]() { return treeViewCssJs; } },
633-
{ "$searchbox", [&]() { return searchBox; } },
634-
{ "$search", [&]() { return searchCssJs; } },
635-
{ "$mathjax", [&]() { return mathJaxJs; } },
636-
{ "$darkmode", [&]() { return darkModeJs; } },
637-
{ "$generatedby", [&]() { return generatedBy; } },
638-
{ "$extrastylesheet",[&]() { return extraCssText; } },
639-
{ "$relpath$", [&]() { return relPath; } } //<-- obsolete: for backwards compatibility only
626+
{ "$datetime", [&]() -> QCString { return "<span class=\"datetime\"></span>"; } },
627+
{ "$date", [&]() -> QCString { return "<span class=\"date\"></span>"; } },
628+
{ "$time", [&]() -> QCString { return "<span class=\"time\"></span>"; } },
629+
{ "$year", [&]() -> QCString { return "<span class=\"year\"></span>"; } },
630+
{ "$navpath", [&]() -> QCString { return navPath; } },
631+
{ "$stylesheet", [&]() -> QCString { return cssFile; } },
632+
{ "$treeview", [&]() -> QCString { return treeViewCssJs; } },
633+
{ "$searchbox", [&]() -> QCString { return searchBox; } },
634+
{ "$search", [&]() -> QCString { return searchCssJs; } },
635+
{ "$mathjax", [&]() -> QCString { return mathJaxJs; } },
636+
{ "$darkmode", [&]() -> QCString { return darkModeJs; } },
637+
{ "$generatedby", [&]() -> QCString { return generatedBy; } },
638+
{ "$extrastylesheet",[&]() -> QCString { return extraCssText; } },
639+
{ "$relpath$", [&]() -> QCString { return relPath; } } //<-- obsolete: for backwards compatibility only
640640
});
641641

642642
result = substitute(result,"$relpath^",relPath); //<-- must be done after the previous substitutions

0 commit comments

Comments
 (0)