Closed Bug 1259898 Opened 4 years ago Closed 4 years ago

Change AnimValuesStyleRule.h to use range-based for loop

Categories

(Core :: DOM: Animation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: rmcauley, Unassigned, Mentored)

Details

Attachments

(1 file)

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: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.