summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Widget.h
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-12-06 20:27:44 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-07 11:48:27 +0100
commit7be0b27dd3cd7185c1b8dc52747c50aad479bc6a (patch)
tree30d42673a64ebb4a6274760e0016f78d6fa91fca /Userland/Libraries/LibGUI/Widget.h
parentbbc149ebb935532c9382278ed98cf9fe8a616422 (diff)
downloadserenity-7be0b27dd3cd7185c1b8dc52747c50aad479bc6a.zip
Meta+Userland: Pass Gfx::IntPoint by value
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
Diffstat (limited to 'Userland/Libraries/LibGUI/Widget.h')
-rw-r--r--Userland/Libraries/LibGUI/Widget.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h
index d0a94584d3..0c374f877b 100644
--- a/Userland/Libraries/LibGUI/Widget.h
+++ b/Userland/Libraries/LibGUI/Widget.h
@@ -240,8 +240,8 @@ public:
WeakPtr<Widget> widget;
Gfx::IntPoint local_position;
};
- HitTestResult hit_test(Gfx::IntPoint const&, ShouldRespectGreediness = ShouldRespectGreediness::Yes);
- Widget* child_at(Gfx::IntPoint const&) const;
+ HitTestResult hit_test(Gfx::IntPoint, ShouldRespectGreediness = ShouldRespectGreediness::Yes);
+ Widget* child_at(Gfx::IntPoint) const;
void set_relative_rect(Gfx::IntRect const&);
void set_relative_rect(int x, int y, int width, int height) { set_relative_rect({ x, y, width, height }); }
@@ -251,13 +251,13 @@ public:
void set_width(int width) { set_relative_rect(x(), y(), width, height()); }
void set_height(int height) { set_relative_rect(x(), y(), width(), height); }
- void move_to(Gfx::IntPoint const& point) { set_relative_rect({ point, relative_rect().size() }); }
+ void move_to(Gfx::IntPoint point) { set_relative_rect({ point, relative_rect().size() }); }
void move_to(int x, int y) { move_to({ x, y }); }
void resize(Gfx::IntSize const& size) { set_relative_rect({ relative_rect().location(), size }); }
void resize(int width, int height) { resize({ width, height }); }
void move_by(int x, int y) { move_by({ x, y }); }
- void move_by(Gfx::IntPoint const& delta) { set_relative_rect({ relative_position().translated(delta), size() }); }
+ void move_by(Gfx::IntPoint delta) { set_relative_rect({ relative_position().translated(delta), size() }); }
Gfx::ColorRole background_role() const { return m_background_role; }
void set_background_role(Gfx::ColorRole);