summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-25 09:31:55 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-25 09:31:55 (GMT)
commit5a0026acd0f273a4aad92dd45e9f7a9938322171 (patch)
treec47a846284675a26a5e8b490dcdf80f36484cb1e
parentceed76634417c6d9db398a4297b361af97f27594 (diff)
downloadDoxygen-5a0026acd0f273a4aad92dd45e9f7a9938322171.zip
Doxygen-5a0026acd0f273a4aad92dd45e9f7a9938322171.tar.gz
Doxygen-5a0026acd0f273a4aad92dd45e9f7a9938322171.tar.bz2
Minor tweaks
-rw-r--r--src/docparser.cpp7
-rw-r--r--src/docparser.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index a41fad6..bfac491 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -882,7 +882,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
* encountered.
*/
static void handleStyleEnter(DocNode *parent,QList<DocNode> &children,
- DocStyleChange::Style s,const QCString tagName,const HtmlAttribList *attribs)
+ DocStyleChange::Style s,const QCString &tagName,const HtmlAttribList *attribs)
{
DBG(("HandleStyleEnter\n"));
DocStyleChange *sc= new DocStyleChange(parent,g_nodeStack.count(),s,tagName,TRUE,attribs);
@@ -897,9 +897,10 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
DocStyleChange::Style s,const char *tagName)
{
DBG(("HandleStyleLeave\n"));
+ QCString tagNameLower = QCString(tagName).lower();
if (g_styleStack.isEmpty() || // no style change
g_styleStack.top()->style()!=s || // wrong style change
- g_styleStack.top()->tagName()!=QCString(tagName).lower() || // wrong style change
+ g_styleStack.top()->tagName()!=tagNameLower || // wrong style change
g_styleStack.top()->position()!=g_nodeStack.count() // wrong position
)
{
@@ -908,7 +909,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
warn_doc_error(g_fileName,doctokenizerYYlineno,"found </%s> tag without matching <%s>",
qPrint(tagName),qPrint(tagName));
}
- else if (g_styleStack.top()->tagName()!=QCString(tagName).lower())
+ else if (g_styleStack.top()->tagName()!=tagNameLower)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"found </%s> tag while expecting </%s>",
qPrint(tagName),qPrint(g_styleStack.top()->tagName()));
diff --git a/src/docparser.h b/src/docparser.h
index 9b437e8..35b2285 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -388,8 +388,8 @@ class DocStyleChange : public DocNode
Ins = (1<<13)
};
- DocStyleChange(DocNode *parent,uint position,Style s,QCString tagName,bool enable,
- const HtmlAttribList *attribs=0) :
+ DocStyleChange(DocNode *parent,uint position,Style s,const QCString &tagName,bool enable,
+ const HtmlAttribList *attribs=0) :
m_position(position), m_style(s), m_enable(enable)
{ m_parent = parent; if (attribs) m_attribs=*attribs; m_tagName = tagName.lower();}
Kind kind() const { return Kind_StyleChange; }