Bug 123699 - [CSSRegions] Use auto keyword to clean-up for loops
Summary: [CSSRegions] Use auto keyword to clean-up for loops
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihnea Ovidenie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-03 01:16 PST by Mihnea Ovidenie
Modified: 2013-11-04 00:26 PST (History)
6 users (show)

See Also:


Attachments
Patch (41.18 KB, patch)
2013-11-03 01:22 PST, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff
Patch for landing (42.46 KB, patch)
2013-11-03 23:56 PST, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihnea Ovidenie 2013-11-03 01:16:06 PST
Start using auto keyword in for loops instead of long iterators.
Comment 1 Mihnea Ovidenie 2013-11-03 01:22:01 PST
Created attachment 215853 [details]
Patch
Comment 2 Anders Carlsson 2013-11-03 07:17:53 PST
Comment on attachment 215853 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215853&action=review

> Source/WebCore/rendering/RenderRegion.cpp:538
> +    for (auto iter = m_renderObjectRegionStyle.begin(), end = m_renderObjectRegionStyle.end(); iter != end; ++iter) {

I think you should change the other loops to have the end iterator in a local variable as well, since you're changing them anyway.
Comment 3 Mihnea Ovidenie 2013-11-03 07:58:59 PST
(In reply to comment #2)
> (From update of attachment 215853 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215853&action=review
> 
> > Source/WebCore/rendering/RenderRegion.cpp:538
> > +    for (auto iter = m_renderObjectRegionStyle.begin(), end = m_renderObjectRegionStyle.end(); iter != end; ++iter) {
> 
> I think you should change the other loops to have the end iterator in a local variable as well, since you're changing them anyway.

Sure, thanks for the review.
Comment 4 Mihnea Ovidenie 2013-11-03 23:56:47 PST
Created attachment 215891 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2013-11-04 00:26:09 PST
Comment on attachment 215891 [details]
Patch for landing

Clearing flags on attachment: 215891

Committed r158559: <http://trac.webkit.org/changeset/158559>
Comment 6 WebKit Commit Bot 2013-11-04 00:26:11 PST
All reviewed patches have been landed.  Closing bug.