WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
136773
[Meta] Type cast by using toFoo()
https://bugs.webkit.org/show_bug.cgi?id=136773
Summary
[Meta] Type cast by using toFoo()
Gyuyoung Kim
Reported
2014-09-11 23:19:04 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug