mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:37:45 +00:00
LibWeb: Add CSSPixels operator overloads for unsigned int
Fixes building on 32-bit, where using operators with size_t (aka unsigned int) results in ambiguity between the overloads for int and unsigned long.
This commit is contained in:
parent
e97c2538b6
commit
79022090bf
1 changed files with 3 additions and 0 deletions
|
@ -275,11 +275,13 @@ inline bool operator<(CSSPixels left, float right) { return left.to_float() < ri
|
||||||
inline bool operator<(CSSPixels left, double right) { return left.to_double() < right; }
|
inline bool operator<(CSSPixels left, double right) { return left.to_double() < right; }
|
||||||
|
|
||||||
constexpr CSSPixels operator*(CSSPixels left, int right) { return left * CSSPixels(right); }
|
constexpr CSSPixels operator*(CSSPixels left, int right) { return left * CSSPixels(right); }
|
||||||
|
constexpr CSSPixels operator*(CSSPixels left, unsigned int right) { return left * CSSPixels(right); }
|
||||||
constexpr CSSPixels operator*(CSSPixels left, unsigned long right) { return left * CSSPixels(right); }
|
constexpr CSSPixels operator*(CSSPixels left, unsigned long right) { return left * CSSPixels(right); }
|
||||||
inline float operator*(CSSPixels left, float right) { return left.to_float() * right; }
|
inline float operator*(CSSPixels left, float right) { return left.to_float() * right; }
|
||||||
inline double operator*(CSSPixels left, double right) { return left.to_double() * right; }
|
inline double operator*(CSSPixels left, double right) { return left.to_double() * right; }
|
||||||
|
|
||||||
constexpr CSSPixels operator*(int left, CSSPixels right) { return right * CSSPixels(left); }
|
constexpr CSSPixels operator*(int left, CSSPixels right) { return right * CSSPixels(left); }
|
||||||
|
constexpr CSSPixels operator*(unsigned int left, CSSPixels right) { return right * CSSPixels(left); }
|
||||||
constexpr CSSPixels operator*(unsigned long left, CSSPixels right) { return right * CSSPixels(left); }
|
constexpr CSSPixels operator*(unsigned long left, CSSPixels right) { return right * CSSPixels(left); }
|
||||||
inline float operator*(float left, CSSPixels right) { return right.to_float() * left; }
|
inline float operator*(float left, CSSPixels right) { return right.to_float() * left; }
|
||||||
inline double operator*(double left, CSSPixels right) { return right.to_double() * left; }
|
inline double operator*(double left, CSSPixels right) { return right.to_double() * left; }
|
||||||
|
@ -372,6 +374,7 @@ constexpr CSSPixels CSSPixels::operator/(CSSPixelFraction const& other) const
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr CSSPixels operator/(CSSPixels left, int right) { return left / CSSPixels(right); }
|
constexpr CSSPixels operator/(CSSPixels left, int right) { return left / CSSPixels(right); }
|
||||||
|
constexpr CSSPixels operator/(CSSPixels left, unsigned int right) { return left / CSSPixels(right); }
|
||||||
constexpr CSSPixels operator/(CSSPixels left, unsigned long right) { return left / CSSPixels(right); }
|
constexpr CSSPixels operator/(CSSPixels left, unsigned long right) { return left / CSSPixels(right); }
|
||||||
inline float operator/(CSSPixels left, float right) { return left.to_float() / right; }
|
inline float operator/(CSSPixels left, float right) { return left.to_float() / right; }
|
||||||
inline double operator/(CSSPixels left, double right) { return left.to_double() / right; }
|
inline double operator/(CSSPixels left, double right) { return left.to_double() / right; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue