mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibGfx+Overall: Remove is_null
from Point
, Rect
and Size
Having a `Point`, `Rect` or `Size` claim it's `null` is silly. We have `Optional<T>` for that. For `Point`, rename `is_null` to `is_zero` to better reflect what we're testing. For `Rect` and `Size`, `is_null` is removed outright. Also, remove `is_empty` from `Point`. Points can't be empty.
This commit is contained in:
parent
d5630bd20e
commit
7b0adee487
12 changed files with 20 additions and 22 deletions
|
@ -45,7 +45,6 @@ public:
|
|||
ALWAYS_INLINE constexpr void set_width(T w) { m_width = w; }
|
||||
ALWAYS_INLINE constexpr void set_height(T h) { m_height = h; }
|
||||
|
||||
[[nodiscard]] ALWAYS_INLINE constexpr bool is_null() const { return !m_width && !m_height; }
|
||||
[[nodiscard]] ALWAYS_INLINE constexpr bool is_empty() const { return m_width <= 0 || m_height <= 0; }
|
||||
|
||||
constexpr void scale_by(T dx, T dy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue