1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +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

@ -55,7 +55,7 @@ public:
calculate();
}
void pan_by(Gfx::IntPoint const& delta)
void pan_by(Gfx::IntPoint delta)
{
auto relative_width_pixel = (m_x_end - m_x_start) / m_bitmap->width();
auto relative_height_pixel = (m_y_end - m_y_start) / m_bitmap->height();
@ -179,7 +179,7 @@ private:
m_y_end = y_mid + aspect_corrected_y_length / 2;
}
void move_contents_by(Gfx::IntPoint const& delta)
void move_contents_by(Gfx::IntPoint delta)
{
// If we're moving down we paint upwards, else we paint downwards, to
// avoid overwriting.
@ -223,7 +223,7 @@ class Mandelbrot : public GUI::Frame {
In,
Out,
};
void zoom(Zoom in_out, Gfx::IntPoint const& center);
void zoom(Zoom in_out, Gfx::IntPoint center);
void reset();
@ -247,7 +247,7 @@ private:
MandelbrotSet m_set;
};
void Mandelbrot::zoom(Zoom in_out, Gfx::IntPoint const& center)
void Mandelbrot::zoom(Zoom in_out, Gfx::IntPoint center)
{
static constexpr double zoom_in_multiplier = 0.8;
static constexpr double zoom_out_multiplier = 1.25;