Closed
Bug 1259734
Opened 8 years ago
Closed 8 years ago
use AppendElements in DisplayItemClip::AppendRoundedRects
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
1.11 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
It is shorter and nicer than writing out the loop ourselves.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8734734 -
Flags: review?(dholbert)
Comment 2•8 years ago
|
||
Comment on attachment 8734734 [details] [diff] [review] use AppendElements in DisplayItemClip::AppendRoundedRects Review of attachment 8734734 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/DisplayItemClip.cpp @@ +403,5 @@ > void > DisplayItemClip::AppendRoundedRects(nsTArray<RoundedRect>* aArray, uint32_t aCount) const > { > uint32_t count = std::min(mRoundedClipRects.Length(), size_t(aCount)); > + aArray->AppendElements(mRoundedClipRects.Elements(), count); While you're at it, could you change the local variable |count| to have type "size_t"? (There's no reason for it to be uint32_t at this point -- we're populating it with a size_t-flavored min() expression, and we're passing it into a function that takes type size_t.) Thanks!
Attachment #8734734 -
Flags: review?(dholbert) → review+
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c24b873c12cb
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•