[Webkit-unassigned] [Bug 25884] WebKit needs a style linting tool

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 8 03:12:27 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25884





--- Comment #15 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2009-07-08 03:12:26 PDT ---
(From update of attachment 32441)
This is great!  It's too bad the tool can't do the corrections itself--making
all these changes by hand would be very time-consuming.

> diff --git a/WebCore/rendering/AutoTableLayout.cpp b/WebCore/rendering/AutoTableLayout.cpp
> [...]
> -                    int newWidth = max(int (m_layoutStruct[i].effMinWidth), w - reduction);
> +                    int newWidth = max(int(m_layoutStruct[i].effMinWidth), w - reduction);

This should actually be flagged as a warning for use of a C-style cast
operator.  WebKit prefers C++-style cast operators:

    int newWidth = max(static_cast<int>(m_layoutStruct[i].effMinWidth), w -
reduction);

Other than this issue, this patch looks good to go!  (Are you sure you don't
want it reviewed?)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list