| Summary: | Modernize ContainerNode::childElementCount | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
| Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, esprehn+autocc, kangil.han | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Sam Weinig
2015-05-12 14:42:02 PDT
Created attachment 252986 [details]
Patch
Attachment 252986 [details] did not pass style-queue:
ERROR: Source/WebCore/dom/ElementChildIterator.h:36: value_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
ERROR: Source/WebCore/dom/ElementChildIterator.h:37: difference_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
ERROR: Source/WebCore/dom/ElementChildIterator.h:40: iterator_category is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
ERROR: Source/WebCore/dom/ElementChildIterator.h:50: value_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
ERROR: Source/WebCore/dom/ElementChildIterator.h:51: difference_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
ERROR: Source/WebCore/dom/ElementChildIterator.h:54: iterator_category is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
Total errors found: 6 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 252986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252986&action=review > Source/WebCore/dom/ElementChildIterator.h:40 > + typedef ElementType value_type; > + typedef ptrdiff_t difference_type; > + typedef ElementType* pointer; > + typedef ElementType& reference; > + typedef std::forward_iterator_tag iterator_category; The modern way to do this is to derive from std::iterator<std::forward_iterator_tag, ElementType>; std::iterator handles the rest by default. > Source/WebCore/dom/ElementChildIterator.h:54 > + typedef const ElementType value_type; > + typedef ptrdiff_t difference_type; > + typedef const ElementType* pointer; > + typedef const ElementType& reference; > + typedef std::forward_iterator_tag iterator_category; The modern way to do this is to derive from std::iterator<std::forward_iterator_tag, const ElementType>; std::iterator handles the rest by default. Comment on attachment 252986 [details] Patch Clearing flags on attachment: 252986 Committed r184309: <http://trac.webkit.org/changeset/184309> All reviewed patches have been landed. Closing bug. |