зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
45c493d5fa
Коммит
443d2b6637
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче