Change AnimValuesStyleRule.h to use range-based for loop

RESOLVED FIXED in Firefox 48

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: rmcauley, Unassigned, Mentored)

Tracking

Trunk
mozilla48
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160315153207

Steps to reproduce:

1. Open AnimValuesStyleRule.h


Actual results:

Saw classic for loop.


Expected results:

Display range-based for loop.
Mentor: bbirtles
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #8735080 - Flags: review?(bbirtles) → review+
Comment on attachment 8735080 [details]
MozReview Request: Bug 1259898: use range-based for loop in AnimValuesStyleRule.h

https://reviewboard.mozilla.org/r/42605/#review39085

Thanks!

r=me with the following change

::: dom/animation/AnimValuesStyleRule.h:64
(Diff revision 1)
>      StyleAnimationValue mValue;
>    };
>  
>    void AddPropertiesToSet(nsCSSPropertySet& aSet) const
>    {
> -    for (size_t i = 0, i_end = mPropertyValuePairs.Length(); i < i_end; ++i) {
> +    for (const PropertyValuePair& cv: mPropertyValuePairs) {

Nit: Please add a space before the :
Comment on attachment 8735080 [details]
MozReview Request: Bug 1259898: use range-based for loop in AnimValuesStyleRule.h

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/42605/diff/1-2/
https://hg.mozilla.org/mozilla-central/rev/310e9b700300
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.