mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 16:47:41 +00:00
LibGUI: Make some GUI event getters return const references
There's no good reason to return rects/sizes/positions by value.
This commit is contained in:
parent
c8d9f1b9c9
commit
b78e13cf2e
1 changed files with 7 additions and 7 deletions
|
@ -132,8 +132,8 @@ public:
|
||||||
|
|
||||||
int parent_client_id() const { return m_parent_client_id; }
|
int parent_client_id() const { return m_parent_client_id; }
|
||||||
int parent_window_id() const { return m_parent_window_id; }
|
int parent_window_id() const { return m_parent_window_id; }
|
||||||
String title() const { return m_title; }
|
const String& title() const { return m_title; }
|
||||||
Gfx::IntRect rect() const { return m_rect; }
|
const Gfx::IntRect& rect() const { return m_rect; }
|
||||||
bool is_active() const { return m_active; }
|
bool is_active() const { return m_active; }
|
||||||
bool is_modal() const { return m_modal; }
|
bool is_modal() const { return m_modal; }
|
||||||
WindowType window_type() const { return m_window_type; }
|
WindowType window_type() const { return m_window_type; }
|
||||||
|
@ -162,7 +162,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::IntRect rect() const { return m_rect; }
|
const Gfx::IntRect& rect() const { return m_rect; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gfx::IntRect m_rect;
|
Gfx::IntRect m_rect;
|
||||||
|
@ -195,7 +195,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vector<Gfx::IntRect, 32>& rects() const { return m_rects; }
|
const Vector<Gfx::IntRect, 32>& rects() const { return m_rects; }
|
||||||
Gfx::IntSize window_size() const { return m_window_size; }
|
const Gfx::IntSize& window_size() const { return m_window_size; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vector<Gfx::IntRect, 32> m_rects;
|
Vector<Gfx::IntRect, 32> m_rects;
|
||||||
|
@ -211,8 +211,8 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::IntRect rect() const { return m_rect; }
|
const Gfx::IntRect& rect() const { return m_rect; }
|
||||||
Gfx::IntSize window_size() const { return m_window_size; }
|
const Gfx::IntSize& window_size() const { return m_window_size; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gfx::IntRect m_rect;
|
Gfx::IntRect m_rect;
|
||||||
|
@ -323,7 +323,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::IntPoint position() const { return m_position; }
|
const Gfx::IntPoint& position() const { return m_position; }
|
||||||
int x() const { return m_position.x(); }
|
int x() const { return m_position.x(); }
|
||||||
int y() const { return m_position.y(); }
|
int y() const { return m_position.y(); }
|
||||||
MouseButton button() const { return m_button; }
|
MouseButton button() const { return m_button; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue