cppcheck: use prefix variant

This commit is contained in:
Caolán McNamara 2010-11-26 21:35:36 +00:00
parent 29787597d3
commit 6072f27fec
2 changed files with 8 additions and 8 deletions

View file

@ -263,10 +263,8 @@ namespace DOM
attr_qname = a->first;
attr_value = a->second;
idx = attr_qname.indexOf(':');
if(idx != -1)
{
if (idx != -1)
aPrefix = attr_qname.copy(0, idx);
}
else
aPrefix = OUString();
@ -275,11 +273,13 @@ namespace DOM
{
// set attribute with namespace
aElement->setAttributeNS(result->second, attr_qname, attr_value);
} else {
}
else
{
// set attribute without namespace
aElement->setAttribute(attr_qname, attr_value);
}
a++;
}
++a;
}
m_aNSStack.push(aNSMap);
}

View file

@ -134,7 +134,7 @@ namespace XPath
p = (xmlChar*)oprefix.getStr();
u = (xmlChar*)ouri.getStr();
xmlXPathRegisterNs(ctx, p, u);
i++;
++i;
}
}
@ -185,7 +185,7 @@ namespace XPath
reinterpret_cast<void*>(
sal::static_int_cast<sal_IntPtr>(aHandle.variableData)));
}
i++;
++i;
}
}