Bug 130803 - Web Inspector: Modernize the loops in InspectorPageAgent.cpp
Summary: Web Inspector: Modernize the loops in InspectorPageAgent.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2014-03-26 15:25 PDT by Timothy Hatcher
Modified: 2014-03-26 16:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.58 KB, patch)
2014-03-26 15:26 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (7.59 KB, patch)
2014-03-26 15:47 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (7.59 KB, patch)
2014-03-26 16:20 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2014-03-26 15:25:12 PDT
C++11 FTW!
Comment 1 Timothy Hatcher 2014-03-26 15:26:52 PDT
Created attachment 227891 [details]
Patch
Comment 2 Joseph Pecoraro 2014-03-26 15:40:17 PDT
Comment on attachment 227891 [details]
Patch

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

> Source/WebCore/inspector/InspectorPageAgent.cpp:455
> +    for (auto cookie : cookiesList)
> +        cookies->addItem(buildObjectForCookie(cookie));

I think we are making these new for loops either "auto*" or "auto&" to be explicit.
Comment 3 Timothy Hatcher 2014-03-26 15:47:30 PDT
Created attachment 227894 [details]
Patch
Comment 4 Joseph Pecoraro 2014-03-26 15:52:53 PDT
Comment on attachment 227894 [details]
Patch

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

r=me

> Source/WebCore/inspector/InspectorPageAgent.cpp:465
> +        auto cachedResource = cachedResourceHandle.get();

I think having CachedResource* here would be helpful instead of auto.
Comment 5 Timothy Hatcher 2014-03-26 16:20:40 PDT
Created attachment 227896 [details]
Patch
Comment 6 WebKit Commit Bot 2014-03-26 16:58:42 PDT
Comment on attachment 227896 [details]
Patch

Clearing flags on attachment: 227896

Committed r166329: <http://trac.webkit.org/changeset/166329>
Comment 7 WebKit Commit Bot 2014-03-26 16:58:45 PDT
All reviewed patches have been landed.  Closing bug.