Skip to content

Commit e1bbf2b

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 8875978 + 51874a8 commit e1bbf2b

File tree

8 files changed

+16
-21
lines changed

8 files changed

+16
-21
lines changed

src/classdef.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
22702270
innerCd->visibleInParentsDeclList()
22712271
)
22722272
{
2273-
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
2273+
const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection *>(lde.get());
22742274
ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
22752275
first=FALSE;
22762276
break;

src/datetime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ QCString dateTimeFromString(const QCString &spec,std::tm &dt,int &format)
142142
}
143143

144144
// find a matching pattern
145-
std::string s = spec.str();
145+
const std::string &s = spec.str();
146146
for (const auto &fmt : g_specFormats)
147147
{
148148
reg::Match m;

src/debug.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ void Debug::print_(DebugMask mask, int prio, fmt::string_view fmt, fmt::format_a
8787
}
8888

8989
static char asciiToLower(char in) {
90-
if (in <= 'Z' && in >= 'A')
91-
return in - ('Z' - 'z');
92-
return in;
90+
if (in <= 'Z' && in >= 'A')
91+
return in - 'A' + 'a';
92+
return in;
9393
}
9494

9595
static uint64_t labelToEnumValue(const QCString &l)

src/definition.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ void DefinitionImpl::Private::setDefFileName(const QCString &df)
120120
void DefinitionImpl::Private::init(const QCString &df, const QCString &n)
121121
{
122122
setDefFileName(df);
123-
QCString lname = n;
124-
if (lname!="<globalScope>")
123+
if (n!="<globalScope>")
125124
{
126125
//extractNamespaceName(m_name,m_localName,ns);
127126
localName=stripScope(n);
@@ -158,7 +157,7 @@ static bool matchExcludedSymbols(const QCString &name)
158157
{
159158
const StringVector &exclSyms = Config_getList(EXCLUDE_SYMBOLS);
160159
if (exclSyms.empty()) return FALSE; // nothing specified
161-
std::string symName = name.str();
160+
const std::string &symName = name.str();
162161
for (const auto &pat : exclSyms)
163162
{
164163
QCString pattern = pat;

src/docnode.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,10 +1428,9 @@ void DocHtmlSummary::parse()
14281428
Token tok = parser()->tokenizer.lex();
14291429
while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
14301430
{
1431-
HtmlTagType tagId = HtmlTagType::UNKNOWN;
14321431
// check of </summary>
14331432
if (tok.value()==TokenRetval::TK_HTMLTAG &&
1434-
(tagId=Mappers::htmlTagMapper->map(parser()->context.token->name))==HtmlTagType::XML_SUMMARY &&
1433+
(Mappers::htmlTagMapper->map(parser()->context.token->name))==HtmlTagType::XML_SUMMARY &&
14351434
parser()->context.token->endTag
14361435
)
14371436
{

src/dotdirdeps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class DotDirPropertyBuilder
5252
DotDirPropertyBuilder &makeTruncated (bool b=true) { m_property.isTruncated =b; return *this; }
5353
DotDirPropertyBuilder &makeOriginal (bool b=true) { m_property.isOriginal =b; return *this; }
5454
DotDirPropertyBuilder &makePeripheral(bool b=true) { m_property.isPeripheral=b; return *this; }
55-
operator DotDirProperty() { return std::move(m_property); }
55+
operator DotDirProperty() { return m_property; }
5656
private:
5757
DotDirProperty m_property;
5858
};

src/dotnode.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,11 @@ QCString DotNode::convertLabel(const QCString &l, LabelStyle style)
197197
{
198198
QCString bBefore("\\_/<({[: =-+@%#~?$"); // break before character set
199199
QCString bAfter(">]),:;|"); // break after character set
200-
QCString p(l);
201-
if (p.isEmpty()) return QCString();
200+
if (l.isEmpty()) return QCString();
202201
QCString result;
203202
char pc=0;
204203
uint32_t idx = 0;
205-
int charsLeft=static_cast<int>(p.length());
204+
int charsLeft=static_cast<int>(l.length());
206205
int sinceLast=0;
207206
int foldLen = Config_getInt(DOT_WRAP_THRESHOLD); // ideal text length
208207
QCString br;
@@ -224,9 +223,9 @@ QCString DotNode::convertLabel(const QCString &l, LabelStyle style)
224223
{
225224
br = "\\l";
226225
}
227-
while (idx < p.length())
226+
while (idx < l.length())
228227
{
229-
char c = p[idx++];
228+
char c = l[idx++];
230229
char cs[2] = { c, 0 };
231230
const char *replacement = cs;
232231
if (style!=LabelStyle::Plain)
@@ -279,14 +278,14 @@ QCString DotNode::convertLabel(const QCString &l, LabelStyle style)
279278
sinceLast=1;
280279
}
281280
else if (charsLeft>1+foldLen/4 && sinceLast>foldLen+foldLen/3 &&
282-
!isupper(c) && isupper(p[idx]))
281+
!isupper(c) && isupper(l[idx]))
283282
{
284283
result+=replacement;
285284
result+=br;
286285
foldLen = (foldLen+sinceLast+1)/2;
287286
sinceLast=0;
288287
}
289-
else if (charsLeft>foldLen/3 && sinceLast>foldLen && bAfter.contains(c) && (c!=':' || p[idx]!=':'))
288+
else if (charsLeft>foldLen/3 && sinceLast>foldLen && bAfter.contains(c) && (c!=':' || l[idx]!=':'))
290289
{
291290
result+=replacement;
292291
result+=br;

src/doxygen.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,7 +2607,7 @@ static MemberDef *addVariableToFile(
26072607
{
26082608
static const reg::Ex re(R"(\a\w*)");
26092609
reg::Match match;
2610-
std::string typ = ttype.str();
2610+
const std::string &typ = ttype.str();
26112611
if (reg::search(typ,match,re))
26122612
{
26132613
QCString typeValue = match.str();
@@ -4552,8 +4552,6 @@ static void findUsedClassesForClass(const Entry *root,
45524552
usedClassName = typeCd->name();
45534553
}
45544554

4555-
int sp=usedClassName.find('<');
4556-
if (sp==-1) sp=0;
45574555
// replace any namespace aliases
45584556
replaceNamespaceAliases(usedClassName);
45594557
// add any template arguments to the class

0 commit comments

Comments
 (0)