Skip to content

Commit d4dd6f0

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 78c2ceb + 220d886 commit d4dd6f0

45 files changed

Lines changed: 821 additions & 261 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/classdef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2428,7 +2428,7 @@ void ClassDefImpl::writeTagFile(TextStream &tagFile) const
24282428
tagFile << " </compound>\n";
24292429
}
24302430

2431-
/** Write class documentation inside another container (i.e. a group) */
2431+
/** Write class documentation inside another container (i.e\. a group) */
24322432
void ClassDefImpl::writeInlineDocumentation(OutputList &ol) const
24332433
{
24342434
bool isSimple = m_isSimple;

src/classdef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class ClassDef : public Definition
141141
/** returns the file name to use for the inheritance graph */
142142
virtual QCString inheritanceGraphFileName() const = 0;
143143

144-
/** Returns the type of compound this is, i.e. class/struct/union/.. */
144+
/** Returns the type of compound this is, i.e\. class/struct/union/..\. */
145145
virtual CompoundType compoundType() const = 0;
146146

147147
/** Returns the type of compound as a string */

src/defgen.cpp

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,9 @@ static void generateDEFForMember(const MemberDef *md,
8787
memPrefix.append( prefix );
8888
memPrefix.append( "-mem-" );
8989

90-
QCString memType;
91-
bool isFunc=FALSE;
92-
switch (md->memberType())
93-
{
94-
case MemberType::Define: memType="define"; break;
95-
case MemberType::EnumValue: ASSERT(0); break;
96-
case MemberType::Property: memType="property"; break;
97-
case MemberType::Event: memType="event"; break;
98-
case MemberType::Variable: memType="variable"; break;
99-
case MemberType::Typedef: memType="typedef"; break;
100-
case MemberType::Enumeration: memType="enum"; break;
101-
case MemberType::Interface: memType="interface"; break;
102-
case MemberType::Service: memType="service"; break;
103-
case MemberType::Sequence: memType="sequence"; break;
104-
case MemberType::Dictionary: memType="dictionary"; break;
105-
case MemberType::Function: memType="function"; isFunc=TRUE; break;
106-
case MemberType::Signal: memType="signal"; isFunc=TRUE; break;
107-
case MemberType::Friend: memType="friend"; isFunc=TRUE; break;
108-
case MemberType::DCOP: memType="dcop"; isFunc=TRUE; break;
109-
case MemberType::Slot: memType="slot"; isFunc=TRUE; break;
110-
}
90+
if (md->memberType() == MemberType::EnumValue) ASSERT(0);
91+
bool isFunc=to_isFunction(md->memberType());
92+
QCString memType = to_string_lower(md->memberType());
11193

11294
t << memPrefix << "kind = '" << memType << "';\n";
11395
t << memPrefix << "id = '"

src/dirdef.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ class UsedDir
7878
const DirDef *dir() const { return m_dir; }
7979

8080
/** Returns true iff any of the dependencies between source and destination files are
81-
* direct (i.e. not "inherited" from sub directories)
81+
* direct (i.e\. not "inherited" from sub directories)
8282
*/
8383
bool hasDirectDeps() const { return m_hasDirectDeps; }
8484

8585
/** Returns true iff any of the dependencies from the source file to the destination file are
86-
* directly coming from a file in the source directory (i.e. not inherited via sub directories)
86+
* directly coming from a file in the source directory (i.e\. not inherited via sub directories)
8787
*/
8888
bool hasDirectSrcDeps() const { return m_hasDirectSrcDeps; }
8989

9090
/** Returns true iff any of the dependencies from the source file to the destination file are
91-
* directly targeting a file in the destination directory (i.e. not inherited via sub directories)
91+
* directly targeting a file in the destination directory (i.e\. not inherited via sub directories)
9292
*/
9393
bool hasDirectDstDeps() const { return m_hasDirectDstDeps; }
9494

src/docsets.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void DocSets::decContentsDepth()
222222
//printf("DocSets::decContentsDepth() depth=%zu\n",p->indentStack.size());
223223
}
224224

225-
void DocSets::addContentsItem(bool isDir,
225+
void DocSets::addContentsItem(bool /*isDir*/,
226226
const QCString &name,
227227
const QCString &ref,
228228
const QCString &file,
@@ -232,7 +232,6 @@ void DocSets::addContentsItem(bool isDir,
232232
const Definition * /*def*/,
233233
const QCString & /* nameAsHtml */)
234234
{
235-
(void)isDir;
236235
//printf("DocSets::addContentsItem(%s) depth=%zu\n",name,p->indentStack.size());
237236
if (ref==nullptr)
238237
{
@@ -508,8 +507,7 @@ void DocSets::writeToken(TextStream &t,
508507
t << " </Token>\n";
509508
}
510509

511-
void DocSets::addIndexFile(const QCString &name)
510+
void DocSets::addIndexFile(const QCString &/*name*/)
512511
{
513-
(void)name;
514512
}
515513

src/fortranscanner.l

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,10 +3116,9 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
31163116
yyextra->current->inbodyDocs = "";
31173117

31183118
// strip \\param or @param, so we can do some extra checking. We will add it later on again.
3119-
if (!loc_doc.stripPrefix("\\param") &&
3120-
!loc_doc.stripPrefix("@param")
3121-
) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning
3122-
loc_doc.stripWhiteSpace();
3119+
if (loc_doc.stripPrefix("\\param") ||
3120+
loc_doc.stripPrefix("@param")
3121+
) loc_doc = loc_doc.stripWhiteSpace();
31233122

31243123
// direction as defined with the declaration of the parameter
31253124
int dir1 = yyextra->modifiers[yyextra->current_root][yyextra->argName.lower().str()].direction;
@@ -3220,12 +3219,11 @@ static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,
32203219
yyextra->current->inbodyDocs = "";
32213220

32223221
// strip \\returns or @returns. We will add it later on again.
3223-
if (!loc_doc.stripPrefix("\\returns") &&
3224-
!loc_doc.stripPrefix("\\return") &&
3225-
!loc_doc.stripPrefix("@returns") &&
3226-
!loc_doc.stripPrefix("@return")
3227-
) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning
3228-
loc_doc.stripWhiteSpace();
3222+
if (loc_doc.stripPrefix("\\returns") ||
3223+
loc_doc.stripPrefix("\\return") ||
3224+
loc_doc.stripPrefix("@returns") ||
3225+
loc_doc.stripPrefix("@return")
3226+
) loc_doc = loc_doc.stripWhiteSpace();
32293227

32303228
if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower()))
32313229
{

src/memberdef.cpp

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4108,26 +4108,15 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
41084108

41094109
QCString MemberDefImpl::memberTypeName() const
41104110
{
4111-
switch (m_mtype)
4112-
{
4113-
case MemberType::Define: return "macro definition";
4114-
case MemberType::Function: return "function";
4115-
case MemberType::Variable: return "variable";
4116-
case MemberType::Typedef: return "typedef";
4117-
case MemberType::Enumeration: return "enumeration";
4118-
case MemberType::EnumValue: return "enumvalue";
4119-
case MemberType::Signal: return "signal";
4120-
case MemberType::Slot: return "slot";
4121-
case MemberType::Friend: return "friend";
4122-
case MemberType::DCOP: return "dcop";
4123-
case MemberType::Property: return "property";
4124-
case MemberType::Event: return "event";
4125-
case MemberType::Interface: return "interface";
4126-
case MemberType::Service: return "service";
4127-
case MemberType::Sequence: return "sequence";
4128-
case MemberType::Dictionary: return "dictionary";
4129-
default: return "unknown";
4111+
if (m_mtype == MemberType::Define)
4112+
{
4113+
return "macro definition";
4114+
}
4115+
else if (m_mtype == MemberType::Enumeration)
4116+
{
4117+
return "enumeration";
41304118
}
4119+
return to_string_lower(m_mtype);
41314120
}
41324121

41334122
void MemberDefImpl::warnIfUndocumented() const
@@ -4638,24 +4627,13 @@ void MemberDefImpl::writeTagFile(TextStream &tagFile,bool useQualifiedName,bool
46384627
if (!isLinkableInProject()) return;
46394628
if (!showNamespaceMembers && getNamespaceDef()) return;
46404629
tagFile << " <member kind=\"";
4641-
switch (m_mtype)
4642-
{
4643-
case MemberType::Define: tagFile << "define"; break;
4644-
case MemberType::EnumValue: tagFile << "enumvalue"; break;
4645-
case MemberType::Property: tagFile << "property"; break;
4646-
case MemberType::Event: tagFile << "event"; break;
4647-
case MemberType::Variable: tagFile << "variable"; break;
4648-
case MemberType::Typedef: tagFile << "typedef"; break;
4649-
case MemberType::Enumeration: tagFile << "enumeration"; break;
4650-
case MemberType::Function: tagFile << "function"; break;
4651-
case MemberType::Signal: tagFile << "signal"; break;
4652-
case MemberType::Friend: tagFile << "friend"; break;
4653-
case MemberType::DCOP: tagFile << "dcop"; break;
4654-
case MemberType::Slot: tagFile << "slot"; break;
4655-
case MemberType::Interface: tagFile << "interface"; break;
4656-
case MemberType::Service: tagFile << "service"; break;
4657-
case MemberType::Sequence: tagFile << "sequence"; break;
4658-
case MemberType::Dictionary: tagFile << "dictionary"; break;
4630+
if (m_mtype == MemberType::Enumeration)
4631+
{
4632+
tagFile << "enumeration";
4633+
}
4634+
else
4635+
{
4636+
tagFile << to_string_lower(m_mtype);
46594637
}
46604638
if (m_prot!=Protection::Public)
46614639
{

src/memberlist.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,9 @@ void MemberList::writePlainDeclarations(OutputList &ol, bool inGroup,
496496
*/
497497
void MemberList::writeDeclarations(OutputList &ol,
498498
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
499-
const QCString &title,const QCString &subtitle, bool showEnumValues,
499+
const QCString &title,const QCString &subtitle, bool /*showEnumValues*/,
500500
bool showInline,const ClassDef *inheritedFrom,MemberListType lt,bool showSectionTitle) const
501501
{
502-
(void)showEnumValues; // unused
503-
504502
//printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
505503
bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
506504
QCString inheritId;

src/message.h

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -204,27 +204,7 @@ template<> struct fmt::formatter<SrcLangExt> : formatter<std::string>
204204
template<> struct fmt::formatter<MemberType> : formatter<std::string>
205205
{
206206
auto format(MemberType mtype, format_context& ctx) const {
207-
std::string result="Unknown";
208-
switch (mtype)
209-
{
210-
case MemberType::Define: result="Define"; break;
211-
case MemberType::Function: result="Function"; break;
212-
case MemberType::Variable: result="Variable"; break;
213-
case MemberType::Typedef: result="Typedef"; break;
214-
case MemberType::Enumeration: result="Enumeration"; break;
215-
case MemberType::EnumValue: result="EnumValue"; break;
216-
case MemberType::Signal: result="Signal"; break;
217-
case MemberType::Slot: result="Slot"; break;
218-
case MemberType::Friend: result="Friend"; break;
219-
case MemberType::DCOP: result="DCOP"; break;
220-
case MemberType::Property: result="Property"; break;
221-
case MemberType::Event: result="Event"; break;
222-
case MemberType::Interface: result="Interface"; break;
223-
case MemberType::Service: result="Service"; break;
224-
case MemberType::Sequence: result="Sequence"; break;
225-
case MemberType::Dictionary: result="Dictionary"; break;
226-
}
227-
return formatter<std::string>::format(result, ctx);
207+
return formatter<std::string>::format(to_string(mtype), ctx);
228208
}
229209
};
230210

src/perlmodgen.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,28 +1498,9 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
14981498
// - template arguments
14991499
// (templateArguments(), definitionTemplateParameterLists())
15001500

1501-
QCString memType;
1501+
QCString memType = to_string_lower(md->memberType());
15021502
QCString name;
1503-
bool isFunc=FALSE;
1504-
switch (md->memberType())
1505-
{
1506-
case MemberType::Define: memType="define"; break;
1507-
case MemberType::EnumValue: memType="enumvalue"; break;
1508-
case MemberType::Property: memType="property"; break;
1509-
case MemberType::Variable: memType="variable"; break;
1510-
case MemberType::Typedef: memType="typedef"; break;
1511-
case MemberType::Enumeration: memType="enum"; break;
1512-
case MemberType::Function: memType="function"; isFunc=TRUE; break;
1513-
case MemberType::Signal: memType="signal"; isFunc=TRUE; break;
1514-
case MemberType::Friend: memType="friend"; isFunc=TRUE; break;
1515-
case MemberType::DCOP: memType="dcop"; isFunc=TRUE; break;
1516-
case MemberType::Slot: memType="slot"; isFunc=TRUE; break;
1517-
case MemberType::Event: memType="event"; break;
1518-
case MemberType::Interface: memType="interface"; break;
1519-
case MemberType::Service: memType="service"; break;
1520-
case MemberType::Sequence: memType="sequence"; break;
1521-
case MemberType::Dictionary: memType="dictionary"; break;
1522-
}
1503+
bool isFunc=to_isFunction(md->memberType());
15231504

15241505
bool isFortran = md->getLanguage()==SrcLangExt::Fortran;
15251506
name = md->name();

0 commit comments

Comments
 (0)