Closed Bug 1175245 Opened 9 years ago Closed 9 years ago

Use range-based "for" loops in nsRefreshDriver.cpp

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

While poking at bug 1164539 (and subsequently bug 1175228), I noticed nsRefreshDriver has some for loops which could stand to be simplified using range-based syntax.
Attached patch fix v1Splinter Review
Attachment #8623231 - Flags: review?(tnikkel)
(This patch layers on top of my patch in bug 1175228; adding dependency to reflect that.)

Note that I left a few loops unconverted -- in particular:
 - Loops over mObservers (which is an array of arrays); the conversion seemed like it might make those loops less readable.
 - A loop over nsCOMArray<imgIContainer> imagesToRefresh -- I think nsCOMArray might not support range-based for loops. (At least, I got compile errors when I tried to convert that loop.
Attachment #8623231 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/f858f1ba0ea5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: