1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:57:35 +00:00

LibWeb: Allow (explicitly) converting CSSPixels to float and int

...and remove some unnecessary cast chains.
This commit is contained in:
MacDue 2023-08-07 22:12:21 +01:00 committed by Alexander Kalenik
parent c20df34b79
commit 5f0d3c083f
11 changed files with 16 additions and 14 deletions

View file

@ -113,6 +113,8 @@ public:
constexpr bool operator==(CSSPixels const& other) const = default;
explicit operator double() const { return to_double(); }
explicit operator float() const { return to_float(); }
explicit operator int() const { return to_int(); }
constexpr CSSPixels& operator++()
{