WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
37220
Adding static method zero() to classes IntPoint and FloatPoint.
https://bugs.webkit.org/show_bug.cgi?id=37220
Summary
Adding static method zero() to classes IntPoint and FloatPoint.
Luiz Agostini
Reported
2010-04-07 11:05:17 PDT
Adding static method zeroPoint to class IntPoint.
Attachments
Patch
(1.12 KB, patch)
2010-04-07 11:09 PDT
,
Luiz Agostini
no flags
Details
Formatted Diff
Diff
Patch
(1.88 KB, patch)
2010-04-07 13:17 PDT
,
Luiz Agostini
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Luiz Agostini
Comment 1
2010-04-07 11:09:57 PDT
Created
attachment 52757
[details]
Patch
Darin Adler
Comment 2
2010-04-07 12:41:48 PDT
Comment on
attachment 52757
[details]
Patch If it's a class member, then it's IntPoint::zeroPoint(), which is worse than IntPoint(). I think we either need it to be: inline IntPoint zeroIntPoint() { return IntPoint(); } Or: static IntPoint zero() { return IntPoint(); } So we don't repeat the word point twice. I also think we should do this for FloatPoint too.
Darin Adler
Comment 3
2010-04-07 12:54:46 PDT
(In reply to
comment #2
)
> inline IntPoint zeroIntPoint() { return IntPoint(); }
Outside the class, so it would be "zeroIntPoint()" at the call site.
> static IntPoint zero() { return IntPoint(); }
Inside the class, so it would be "IntPoint::zero()" at the call site.
Luiz Agostini
Comment 4
2010-04-07 13:17:37 PDT
Created
attachment 52776
[details]
Patch
Darin Adler
Comment 5
2010-04-07 14:10:01 PDT
Comment on
attachment 52776
[details]
Patch Thanks for implementing my suggestion. I think using this at various call sites instead of IntPoint() or IntPoint(0, 0) will make things a little more readable.
WebKit Commit Bot
Comment 6
2010-04-07 14:53:34 PDT
Comment on
attachment 52776
[details]
Patch Clearing flags on attachment: 52776 Committed
r57236
: <
http://trac.webkit.org/changeset/57236
>
WebKit Commit Bot
Comment 7
2010-04-07 14:53:41 PDT
All reviewed patches have been landed. Closing bug.
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