Bug 1166544 - Use ReplaceElementAt instead of Clear and InsertElementAt in SVGMotionSMILType::Add. r=dholbert

This commit is contained in:
Birunthan Mohanathas 2015-05-20 16:20:50 +01:00
Родитель 166420ff0b
Коммит 6e8a563ffc
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -307,8 +307,7 @@ SVGMotionSMILType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
// Replace destination's current value -- a point-on-a-path -- with the
// translation that results from our addition.
dstArr.Clear();
dstArr.AppendElement(MotionSegment(newX, newY, rotateAngle));
dstArr.ReplaceElementAt(0, MotionSegment(newX, newY, rotateAngle));
return NS_OK;
}