Optimization. Make const in InsertTag method
--HG-- branch : feature
This commit is contained in:
parent
ebab22d6ca
commit
56db3f6f1a
|
@ -1098,18 +1098,17 @@ void VAbstractPattern::CheckTagExists(const QString &tag)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::InsertTag(QStringList tags, QDomElement element)
|
||||
void VAbstractPattern::InsertTag(const QStringList tags, const QDomElement element)
|
||||
{
|
||||
QDomElement pattern = documentElement();
|
||||
for (int i = tags.indexOf(element.tagName())-1; i >= 0; --i)
|
||||
{
|
||||
QDomNodeList list = elementsByTagName(tags.at(i));
|
||||
const QDomNodeList list = elementsByTagName(tags.at(i));
|
||||
if (list.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
pattern.insertAfter(element, list.at(0));
|
||||
return;
|
||||
}
|
||||
SetVersion();
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ protected:
|
|||
void SetActivPP(const QString& name);
|
||||
|
||||
void CheckTagExists(const QString &tag);
|
||||
void InsertTag(QStringList tags, QDomElement element);
|
||||
void InsertTag(const QStringList tags, const QDomElement element);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VAbstractPattern)
|
||||
|
|
Loading…
Reference in New Issue
Block a user