1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

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.
This commit is contained in:
MacDue 2022-12-06 20:27:44 +00:00 committed by Andreas Kling
parent bbc149ebb9
commit 7be0b27dd3
161 changed files with 442 additions and 441 deletions

View file

@ -222,7 +222,7 @@ void AbstractTableView::mousedown_event(MouseEvent& event)
AbstractView::mousedown_event(event);
}
ModelIndex AbstractTableView::index_at_event_position(Gfx::IntPoint const& position, bool& is_toggle) const
ModelIndex AbstractTableView::index_at_event_position(Gfx::IntPoint position, bool& is_toggle) const
{
is_toggle = false;
if (!model())
@ -242,7 +242,7 @@ ModelIndex AbstractTableView::index_at_event_position(Gfx::IntPoint const& posit
return {};
}
ModelIndex AbstractTableView::index_at_event_position(Gfx::IntPoint const& position) const
ModelIndex AbstractTableView::index_at_event_position(Gfx::IntPoint position) const
{
bool is_toggle;
auto index = index_at_event_position(position, is_toggle);
@ -343,7 +343,7 @@ Gfx::IntRect AbstractTableView::row_rect(int item_index) const
row_height() };
}
Gfx::IntPoint AbstractTableView::adjusted_position(Gfx::IntPoint const& position) const
Gfx::IntPoint AbstractTableView::adjusted_position(Gfx::IntPoint position) const
{
return position.translated(horizontal_scrollbar().value() - frame_thickness(), vertical_scrollbar().value() - frame_thickness());
}
@ -477,7 +477,7 @@ bool AbstractTableView::is_navigation(GUI::KeyEvent& event)
}
}
Gfx::IntPoint AbstractTableView::automatic_scroll_delta_from_position(Gfx::IntPoint const& pos) const
Gfx::IntPoint AbstractTableView::automatic_scroll_delta_from_position(Gfx::IntPoint pos) const
{
if (pos.y() > column_header().height() + autoscroll_threshold())
return AbstractScrollableWidget::automatic_scroll_delta_from_position(pos);