diff options
author | MacDue <macdue@dueutil.tech> | 2022-12-06 20:57:07 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-07 11:48:27 +0100 |
commit | e011eafd3790ca0375a4678a9cb2debd0ae95ac7 (patch) | |
tree | 0a0b3a8131a2a61befe85aa841e32958bd53c50d /Userland/Applications | |
parent | 7be0b27dd3cd7185c1b8dc52747c50aad479bc6a (diff) | |
download | serenity-e011eafd3790ca0375a4678a9cb2debd0ae95ac7.zip |
Meta+Userland: Pass Gfx::FloatPoint by value
Just a small 8-byte value like Gfx::IntPoint.
Diffstat (limited to 'Userland/Applications')
5 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.cpp index 919110793c..672b4aa3a4 100644 --- a/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.cpp @@ -218,7 +218,7 @@ GUI::Widget* PolygonalSelectTool::get_properties_widget() return m_properties_widget.ptr(); } -Gfx::IntPoint PolygonalSelectTool::point_position_to_preferred_cell(Gfx::FloatPoint const& position) const +Gfx::IntPoint PolygonalSelectTool::point_position_to_preferred_cell(Gfx::FloatPoint position) const { return position.to_type<int>(); } diff --git a/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.h b/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.h index f5300cdbce..0b0a87c6bc 100644 --- a/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.h +++ b/Userland/Applications/PixelPaint/Tools/PolygonalSelectTool.h @@ -24,7 +24,7 @@ public: virtual void on_second_paint(Layer const*, GUI::PaintEvent&) override; virtual GUI::Widget* get_properties_widget() override; virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override { return Gfx::StandardCursor::Crosshair; } - virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint const& position) const override; + virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint position) const override; private: virtual void flood_polygon_selection(Gfx::Bitmap&, Gfx::IntPoint); diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp index ab39950680..d62ad2d1d2 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp @@ -217,7 +217,7 @@ GUI::Widget* RectangleSelectTool::get_properties_widget() return m_properties_widget.ptr(); } -Gfx::IntPoint RectangleSelectTool::point_position_to_preferred_cell(Gfx::FloatPoint const& position) const +Gfx::IntPoint RectangleSelectTool::point_position_to_preferred_cell(Gfx::FloatPoint position) const { return position.to_rounded<int>(); } diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h index b93dc5d8f6..3034ece808 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h @@ -28,7 +28,7 @@ public: virtual void on_second_paint(Layer const*, GUI::PaintEvent&) override; virtual GUI::Widget* get_properties_widget() override; virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override { return Gfx::StandardCursor::Crosshair; } - virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint const& position) const override; + virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint position) const override; private: virtual StringView tool_name() const override { return "Rectangle Select Tool"sv; } diff --git a/Userland/Applications/PixelPaint/Tools/Tool.h b/Userland/Applications/PixelPaint/Tools/Tool.h index e243c41eeb..0662e46f80 100644 --- a/Userland/Applications/PixelPaint/Tools/Tool.h +++ b/Userland/Applications/PixelPaint/Tools/Tool.h @@ -66,7 +66,7 @@ public: virtual void on_tool_activation() { } virtual GUI::Widget* get_properties_widget() { return nullptr; } virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() { return Gfx::StandardCursor::None; } - virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint const& position) const { return position.to_type<int>(); } + virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint position) const { return position.to_type<int>(); } void clear() { m_editor = nullptr; } void setup(ImageEditor&); |