diff options
Diffstat (limited to 'Userland/Applications/PixelPaint/Tools')
28 files changed, 56 insertions, 127 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp index 62e2075d23..3e5786555f 100644 --- a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp @@ -18,14 +18,6 @@ namespace PixelPaint { -BrushTool::BrushTool() -{ -} - -BrushTool::~BrushTool() -{ -} - void BrushTool::on_mousedown(Layer* layer, MouseEvent& event) { if (!layer) diff --git a/Userland/Applications/PixelPaint/Tools/BrushTool.h b/Userland/Applications/PixelPaint/Tools/BrushTool.h index 36daa91935..d76c40e295 100644 --- a/Userland/Applications/PixelPaint/Tools/BrushTool.h +++ b/Userland/Applications/PixelPaint/Tools/BrushTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2020, Ben Jilks <benjyjilks@gmail.com> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -13,8 +14,8 @@ namespace PixelPaint { class BrushTool : public Tool { public: - BrushTool(); - virtual ~BrushTool() override; + BrushTool() = default; + virtual ~BrushTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/BucketTool.cpp b/Userland/Applications/PixelPaint/Tools/BucketTool.cpp index 8b417cfa35..380b387728 100644 --- a/Userland/Applications/PixelPaint/Tools/BucketTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/BucketTool.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -23,10 +24,6 @@ BucketTool::BucketTool() m_cursor = Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/bucket.png").release_value_but_fixme_should_propagate_errors(); } -BucketTool::~BucketTool() -{ -} - static float color_distance_squared(Gfx::Color const& lhs, Gfx::Color const& rhs) { int a = rhs.red() - lhs.red(); diff --git a/Userland/Applications/PixelPaint/Tools/BucketTool.h b/Userland/Applications/PixelPaint/Tools/BucketTool.h index a603914ab9..fc5e01f5d1 100644 --- a/Userland/Applications/PixelPaint/Tools/BucketTool.h +++ b/Userland/Applications/PixelPaint/Tools/BucketTool.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -13,7 +14,7 @@ namespace PixelPaint { class BucketTool final : public Tool { public: BucketTool(); - virtual ~BucketTool() override; + virtual ~BucketTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual GUI::Widget* get_properties_widget() override; diff --git a/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp b/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp index 2eca8ec643..998ee2cb49 100644 --- a/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,14 +21,6 @@ namespace PixelPaint { -EllipseTool::EllipseTool() -{ -} - -EllipseTool::~EllipseTool() -{ -} - void EllipseTool::draw_using(GUI::Painter& painter, Gfx::IntPoint const& start_position, Gfx::IntPoint const& end_position, int thickness) { Gfx::IntRect ellipse_intersecting_rect; diff --git a/Userland/Applications/PixelPaint/Tools/EllipseTool.h b/Userland/Applications/PixelPaint/Tools/EllipseTool.h index 7cc8722a66..03085d8277 100644 --- a/Userland/Applications/PixelPaint/Tools/EllipseTool.h +++ b/Userland/Applications/PixelPaint/Tools/EllipseTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -9,14 +10,15 @@ #include "Tool.h" #include <LibGUI/Forward.h> +#include <LibGUI/TextBox.h> #include <LibGfx/Point.h> namespace PixelPaint { class EllipseTool final : public Tool { public: - EllipseTool(); - virtual ~EllipseTool() override; + EllipseTool() = default; + virtual ~EllipseTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp index b60a831c9c..01fb66b855 100644 --- a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,14 +21,6 @@ namespace PixelPaint { -EraseTool::EraseTool() -{ -} - -EraseTool::~EraseTool() -{ -} - Color EraseTool::color_for(GUI::MouseEvent const&) { if (m_use_secondary_color) diff --git a/Userland/Applications/PixelPaint/Tools/EraseTool.h b/Userland/Applications/PixelPaint/Tools/EraseTool.h index 6fbf048326..e53e0d22ee 100644 --- a/Userland/Applications/PixelPaint/Tools/EraseTool.h +++ b/Userland/Applications/PixelPaint/Tools/EraseTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -16,8 +17,8 @@ namespace PixelPaint { class EraseTool final : public BrushTool { public: - EraseTool(); - virtual ~EraseTool() override; + EraseTool() = default; + virtual ~EraseTool() override = default; virtual GUI::Widget* get_properties_widget() override; diff --git a/Userland/Applications/PixelPaint/Tools/GuideTool.cpp b/Userland/Applications/PixelPaint/Tools/GuideTool.cpp index 9a7e422955..1203fe7285 100644 --- a/Userland/Applications/PixelPaint/Tools/GuideTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/GuideTool.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -15,14 +16,6 @@ namespace PixelPaint { -GuideTool::GuideTool() -{ -} - -GuideTool::~GuideTool() -{ -} - RefPtr<Guide> GuideTool::closest_guide(const Gfx::IntPoint& point) { auto guides = editor()->guides(); diff --git a/Userland/Applications/PixelPaint/Tools/GuideTool.h b/Userland/Applications/PixelPaint/Tools/GuideTool.h index fab699aedf..67aeabc09c 100644 --- a/Userland/Applications/PixelPaint/Tools/GuideTool.h +++ b/Userland/Applications/PixelPaint/Tools/GuideTool.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -9,14 +10,15 @@ #include "../Guide.h" #include "Tool.h" #include <AK/RefPtr.h> +#include <LibGUI/Menu.h> namespace PixelPaint { class GuideTool final : public Tool { public: - GuideTool(); + GuideTool() = default; - virtual ~GuideTool() override; + virtual ~GuideTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/LineTool.cpp b/Userland/Applications/PixelPaint/Tools/LineTool.cpp index 9b3db8ecc5..425f74ca64 100644 --- a/Userland/Applications/PixelPaint/Tools/LineTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/LineTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -31,14 +32,6 @@ static Gfx::IntPoint constrain_line_angle(Gfx::IntPoint const& start_pos, Gfx::I start_pos.y() + (int)(AK::sin(constrained_angle) * line_length) }; } -LineTool::LineTool() -{ -} - -LineTool::~LineTool() -{ -} - void LineTool::on_mousedown(Layer* layer, MouseEvent& event) { if (!layer) diff --git a/Userland/Applications/PixelPaint/Tools/LineTool.h b/Userland/Applications/PixelPaint/Tools/LineTool.h index 874c3b5ddd..2b91236911 100644 --- a/Userland/Applications/PixelPaint/Tools/LineTool.h +++ b/Userland/Applications/PixelPaint/Tools/LineTool.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -14,8 +15,8 @@ namespace PixelPaint { class LineTool final : public Tool { public: - LineTool(); - virtual ~LineTool() override; + LineTool() = default; + virtual ~LineTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp index 9690715c6a..694e04b129 100644 --- a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -14,14 +15,6 @@ namespace PixelPaint { -MoveTool::MoveTool() -{ -} - -MoveTool::~MoveTool() -{ -} - void MoveTool::on_mousedown(Layer* layer, MouseEvent& event) { if (event.image_event().button() == GUI::MouseButton::Secondary) { diff --git a/Userland/Applications/PixelPaint/Tools/MoveTool.h b/Userland/Applications/PixelPaint/Tools/MoveTool.h index d62d554258..e022256cce 100644 --- a/Userland/Applications/PixelPaint/Tools/MoveTool.h +++ b/Userland/Applications/PixelPaint/Tools/MoveTool.h @@ -1,19 +1,21 @@ /* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once +#include "../Layer.h" #include "Tool.h" namespace PixelPaint { class MoveTool final : public Tool { public: - MoveTool(); - virtual ~MoveTool() override; + MoveTool() = default; + virtual ~MoveTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/PenTool.cpp b/Userland/Applications/PixelPaint/Tools/PenTool.cpp index 587755ae8a..fa7170ba92 100644 --- a/Userland/Applications/PixelPaint/Tools/PenTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/PenTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -22,10 +23,6 @@ PenTool::PenTool() set_size(1); } -PenTool::~PenTool() -{ -} - void PenTool::draw_point(Gfx::Bitmap& bitmap, Gfx::Color const& color, Gfx::IntPoint const& point) { GUI::Painter painter(bitmap); diff --git a/Userland/Applications/PixelPaint/Tools/PenTool.h b/Userland/Applications/PixelPaint/Tools/PenTool.h index 5ac5f23c0a..502724ce03 100644 --- a/Userland/Applications/PixelPaint/Tools/PenTool.h +++ b/Userland/Applications/PixelPaint/Tools/PenTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -16,7 +17,7 @@ namespace PixelPaint { class PenTool final : public BrushTool { public: PenTool(); - virtual ~PenTool() override; + virtual ~PenTool() override = default; virtual GUI::Widget* get_properties_widget() override; diff --git a/Userland/Applications/PixelPaint/Tools/PickerTool.cpp b/Userland/Applications/PixelPaint/Tools/PickerTool.cpp index 1c209687d2..54fa83c2dd 100644 --- a/Userland/Applications/PixelPaint/Tools/PickerTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/PickerTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -13,14 +14,6 @@ namespace PixelPaint { -PickerTool::PickerTool() -{ -} - -PickerTool::~PickerTool() -{ -} - void PickerTool::on_mousedown(Layer* layer, MouseEvent& event) { auto& position = event.layer_event().position(); diff --git a/Userland/Applications/PixelPaint/Tools/PickerTool.h b/Userland/Applications/PixelPaint/Tools/PickerTool.h index 564632e7dd..1fab7e04e1 100644 --- a/Userland/Applications/PixelPaint/Tools/PickerTool.h +++ b/Userland/Applications/PixelPaint/Tools/PickerTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -13,8 +14,8 @@ namespace PixelPaint { class PickerTool final : public Tool { public: - PickerTool(); - virtual ~PickerTool() override; + PickerTool() = default; + virtual ~PickerTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp index 559be8ae9a..9f7de2d0d8 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -18,14 +19,6 @@ namespace PixelPaint { -RectangleSelectTool::RectangleSelectTool() -{ -} - -RectangleSelectTool::~RectangleSelectTool() -{ -} - void RectangleSelectTool::on_mousedown(Layer*, MouseEvent& event) { auto& image_event = event.image_event(); diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h index 9216db6705..7d151a9fc2 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -16,8 +17,8 @@ namespace PixelPaint { class RectangleSelectTool final : public Tool { public: - RectangleSelectTool(); - virtual ~RectangleSelectTool(); + RectangleSelectTool() = default; + virtual ~RectangleSelectTool() = default; virtual void on_mousedown(Layer*, MouseEvent& event) override; virtual void on_mousemove(Layer*, MouseEvent& event) override; diff --git a/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp index fccddc0ce7..b24d024a17 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,14 +21,6 @@ namespace PixelPaint { -RectangleTool::RectangleTool() -{ -} - -RectangleTool::~RectangleTool() -{ -} - void RectangleTool::draw_using(GUI::Painter& painter, Gfx::IntPoint const& start_position, Gfx::IntPoint const& end_position, int thickness) { Gfx::IntRect rect; diff --git a/Userland/Applications/PixelPaint/Tools/RectangleTool.h b/Userland/Applications/PixelPaint/Tools/RectangleTool.h index 410893da0c..781b113364 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleTool.h +++ b/Userland/Applications/PixelPaint/Tools/RectangleTool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -15,8 +16,8 @@ namespace PixelPaint { class RectangleTool final : public Tool { public: - RectangleTool(); - virtual ~RectangleTool() override; + RectangleTool() = default; + virtual ~RectangleTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mousemove(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp index 711ce0d3db..0d099f0d36 100644 --- a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -28,10 +29,6 @@ SprayTool::SprayTool() m_timer->set_interval(200); } -SprayTool::~SprayTool() -{ -} - static double nrand() { return double(rand()) / double(RAND_MAX); diff --git a/Userland/Applications/PixelPaint/Tools/SprayTool.h b/Userland/Applications/PixelPaint/Tools/SprayTool.h index 1b492433f9..015e5703ee 100644 --- a/Userland/Applications/PixelPaint/Tools/SprayTool.h +++ b/Userland/Applications/PixelPaint/Tools/SprayTool.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -16,7 +17,7 @@ namespace PixelPaint { class SprayTool final : public Tool { public: SprayTool(); - virtual ~SprayTool() override; + virtual ~SprayTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual void on_mouseup(Layer*, MouseEvent&) override; diff --git a/Userland/Applications/PixelPaint/Tools/Tool.cpp b/Userland/Applications/PixelPaint/Tools/Tool.cpp index e1dde2fa05..4c647b1d5b 100644 --- a/Userland/Applications/PixelPaint/Tools/Tool.cpp +++ b/Userland/Applications/PixelPaint/Tools/Tool.cpp @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -11,14 +12,6 @@ namespace PixelPaint { -Tool::Tool() -{ -} - -Tool::~Tool() -{ -} - void Tool::setup(ImageEditor& editor) { m_editor = editor; diff --git a/Userland/Applications/PixelPaint/Tools/Tool.h b/Userland/Applications/PixelPaint/Tools/Tool.h index f72f06d2fc..14a9ed935c 100644 --- a/Userland/Applications/PixelPaint/Tools/Tool.h +++ b/Userland/Applications/PixelPaint/Tools/Tool.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -8,6 +9,7 @@ #pragma once #include <AK/Variant.h> +#include <LibGUI/Action.h> #include <LibGUI/Event.h> #include <LibGUI/Forward.h> #include <LibGUI/ValueSlider.h> @@ -20,7 +22,7 @@ class Layer; class Tool { public: - virtual ~Tool(); + virtual ~Tool() = default; class MouseEvent { public: @@ -73,7 +75,7 @@ public: void set_action(GUI::Action*); protected: - Tool(); + Tool() = default; WeakPtr<ImageEditor> m_editor; RefPtr<GUI::Action> m_action; diff --git a/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp b/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp index b1ca6dc28f..88b52725a5 100644 --- a/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, the SerenityOS developers. + * Copyright (c) 2021-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -12,14 +12,6 @@ namespace PixelPaint { -ZoomTool::ZoomTool() -{ -} - -ZoomTool::~ZoomTool() -{ -} - void ZoomTool::on_mousedown(Layer*, MouseEvent& event) { auto& raw_event = event.raw_event(); diff --git a/Userland/Applications/PixelPaint/Tools/ZoomTool.h b/Userland/Applications/PixelPaint/Tools/ZoomTool.h index be1a3558fb..b52440c812 100644 --- a/Userland/Applications/PixelPaint/Tools/ZoomTool.h +++ b/Userland/Applications/PixelPaint/Tools/ZoomTool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, the SerenityOS developers. + * Copyright (c) 2021-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -14,8 +14,8 @@ namespace PixelPaint { class ZoomTool final : public Tool { public: - ZoomTool(); - virtual ~ZoomTool() override; + ZoomTool() = default; + virtual ~ZoomTool() override = default; virtual void on_mousedown(Layer*, MouseEvent&) override; virtual GUI::Widget* get_properties_widget() override; |