diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/docparser.cpp | 7 | ||||
-rw-r--r-- | src/docparser.h | 4 |
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; } |