[Webkit-unassigned] [Bug 136773] New: [Meta] Type cast by using toFoo()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 11 23:19:01 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=136773
Summary: [Meta] Type cast by using toFoo()
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: gyuyoung.kim at webkit.org
As I announced in https://lists.webkit.org/pipermail/webkit-dev/2013-September/025532.html, this bug is to track bugs which changes to use toFoo() instead of static_cast<>.
To use toFoo() for type casting, there are below benefits,
- Bad type cast can be detected by using ASSERTION in toFoo(). The
toFoo() function has an ASSERTION to check if source value is a proper
super class.
- Unnecessary local variables can be removed. There are some local
variables, which are only used once in WebKit. In those cases, we don’t
need to use a local variable. Besides, we can remove unnecessary ASSERTION
because toFoo() already has it.
- I believe toFoo() can improve code readability.
--
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