Summary: | SVGPathSeg*(Abs|Rel) classses should be combined to reduce code size | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> | ||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Trivial | Keywords: | EasyFix | ||||||
Priority: | P4 | ||||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
Attachments: |
|
Description
Eric Seidel (no email)
2006-12-31 19:47:21 PST
Created attachment 21221 [details]
First attempt
Simple cleanup patch.
Cheers,
Rob.
Comment on attachment 21221 [details]
First attempt
+ virtual String toString() const { return pathSegTypeAsLetter() + String::format(" %.6lg %.6lg", m_x, m_y); }
Might be more efficient if you passed the char as part of the format. Not sure it matters though.
Generally we encourage each of these to get their own line:
36 : m_x(x), m_y(y), m_r1(r1), m_r2(r2), m_angle(angle), m_largeArcFlag(largeArcFlag), m_sweepFlag(sweepFlag) {}
In general looks great! I love all the minus lines.
Created attachment 21303 [details]
Improved patch
So I noticed that the template approach added some bloat, I think we are better
without it. Also I missed two files, now they are part of the patch.
Cheers,
Rob.
Comment on attachment 21303 [details]
Improved patch
Looks fine.
|