Bug 1259734 - use AppendElements in DisplayItemClip::AppendRoundedRects; r=dholbert

It is shorter and nicer than writing out the loop ourselves.
This commit is contained in:
Nathan Froyd 2016-03-25 09:34:37 -04:00
Родитель 45c493d5fa
Коммит 443d2b6637
1 изменённых файлов: 2 добавлений и 4 удалений

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

@ -403,10 +403,8 @@ DisplayItemClip::GetCommonRoundedRectCount(const DisplayItemClip& aOther,
void
DisplayItemClip::AppendRoundedRects(nsTArray<RoundedRect>* aArray, uint32_t aCount) const
{
uint32_t count = std::min(mRoundedClipRects.Length(), size_t(aCount));
for (uint32_t i = 0; i < count; ++i) {
*aArray->AppendElement() = mRoundedClipRects[i];
}
size_t count = std::min(mRoundedClipRects.Length(), size_t(aCount));
aArray->AppendElements(mRoundedClipRects.Elements(), count);
}
bool