RESOLVED FIXED 137271
[TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, TextureMapperLayer
https://bugs.webkit.org/show_bug.cgi?id=137271
Summary [TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, Textur...
Zan Dobersek
Reported 2014-09-30 14:31:58 PDT
[TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, TextureMapperLayer
Attachments
Patch (7.20 KB, patch)
2014-09-30 14:33 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2014-09-30 14:33:53 PDT
WebKit Commit Bot
Comment 2 2014-09-30 14:35:34 PDT
Attachment 238963 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:642: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sergio Villar Senin
Comment 3 2014-10-01 01:02:51 PDT
Comment on attachment 238963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238963&action=review I love range based for loops. I guess the style issue is a false positive, time to report a bug? > Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:644 > + }); Haven't seen this before in WK code. Is it an accepted C++11 feature?
Zan Dobersek
Comment 4 2014-10-01 05:04:17 PDT
Comment on attachment 238963 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238963&action=review >> Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:644 >> + }); > > Haven't seen this before in WK code. Is it an accepted C++11 feature? It's already used in a few places, for instance MediaSource.cpp. http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp I believe these utilities are an elegant replacement for manually writing out these idioms. The compilers are also smart enough to properly optimize the lambda expression. The only shortfall is the need to explicitly declare the start and end of the range, instead of being able to simply pass a range-like object to the function.
Zan Dobersek
Comment 5 2014-10-01 13:45:32 PDT
(In reply to comment #3) > (From update of attachment 238963 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238963&action=review > > I guess the style issue is a false positive, time to report a bug? > Reported bug #137309.
Zan Dobersek
Comment 6 2014-10-01 13:53:30 PDT
Comment on attachment 238963 [details] Patch Clearing flags on attachment: 238963 Committed r174168: <http://trac.webkit.org/changeset/174168>
Zan Dobersek
Comment 7 2014-10-01 13:53:39 PDT
All reviewed patches have been landed. Closing bug.
Fujii Hironori
Comment 8 2020-11-08 18:02:53 PST
*** Bug 124999 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.