Open
Bug 1727390
Opened 3 years ago
Updated 3 years ago
Improve the ergonomic of arithmetic operations between AuCoord64, AuCoord and nscoord
Categories
(Core :: Layout, enhancement)
Core
Layout
Tracking
()
NEW
People
(Reporter: TYLin, Unassigned)
References
Details
Currently, AuCoord64
or AuCoord
's arithmetic operations of the same type work well. For example,
AuCoord a = 30;
AuCoord b = 60;
a + b; // ok
a += b; // ok
AuCoord64 c = 90;
AuCoord64 d = 120;
c + d; // ok
c += d; // ok
However, if we mix AuCoord64
with either AuCoord
or nscoord
, some operations need explicit type conversion to compile. For example,
nscoord e = 100;
a + e // still ok
a += e // still ok
c + e // error, need to use c + AuCoord64(e)
c += e // still ok
c + a // error, need to use c + AuCoord64(a)
c += a // error, need to use c + AuCoord64(a)
You need to log in
before you can comment on or make changes to this bug.
Description
•