Bug 80835
Summary: | Style checker complains about naming parameter with default values | ||
---|---|---|---|
Product: | WebKit | Reporter: | Antonio Gomes <tonikitoo> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | abarth, ap, zan |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Antonio Gomes
It happened in https://bugs.webkit.org/show_bug.cgi?id=79611#c4
Code looks like this:
- void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode);
+ void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy strategy = AnyRule);
and the code style checker complained that 'strategy' added not value:
>> Source/WebCore/page/FrameView.h:283: The parameter name "strategy" adds no information, so it should be removed. [readability/parameter_name] [5]
However it is needed, given the default value.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Actually, this should work:
+ void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);
Antonio Gomes
(In reply to comment #1)
> Actually, this should work:
>
> + void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);
oh thanks, so this is INVALID.
David Levin
*** Bug 105831 has been marked as a duplicate of this bug. ***