Don't construct unneeded autostring. Bug 362316, r+sr=sicking

This commit is contained in:
bzbarsky%mit.edu 2006-12-01 04:44:57 +00:00
parent a09f17bab9
commit 55c90dbd0d

View File

@ -833,10 +833,9 @@ nsAttrValue::ParseEnumValue(const nsAString& aValue,
{
ResetIfSet();
nsAutoString val(aValue);
while (aTable->tag) {
if (aCaseSensitive ? val.EqualsASCII(aTable->tag) :
val.EqualsIgnoreCase(aTable->tag)) {
if (aCaseSensitive ? aValue.EqualsASCII(aTable->tag) :
aValue.LowerCaseEqualsASCII(aTable->tag)) {
// Find index of EnumTable
PRInt16 index = sEnumTableArray->IndexOf(aTable);