summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/Layer.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-12 09:45:07 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-12 11:19:29 +0200
commitc7f7c1f7f0914132f77f3e8bf38ba9e416fa97aa (patch)
tree3a3c8aa93fe9bff0c85aab128a71e7c8b18d7332 /Userland/Applications/PixelPaint/Layer.h
parenta612c222786f45100a00364a999606326f0d9fd6 (diff)
downloadserenity-c7f7c1f7f0914132f77f3e8bf38ba9e416fa97aa.zip
PixelPaint: Use move semantics around Layer construction and accessors
Diffstat (limited to 'Userland/Applications/PixelPaint/Layer.h')
-rw-r--r--Userland/Applications/PixelPaint/Layer.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/PixelPaint/Layer.h b/Userland/Applications/PixelPaint/Layer.h
index 8286ed84a0..846aab6ee5 100644
--- a/Userland/Applications/PixelPaint/Layer.h
+++ b/Userland/Applications/PixelPaint/Layer.h
@@ -24,8 +24,8 @@ class Layer
AK_MAKE_NONMOVABLE(Layer);
public:
- static RefPtr<Layer> try_create_with_size(Image&, Gfx::IntSize const&, String const& name);
- static RefPtr<Layer> try_create_with_bitmap(Image&, Gfx::Bitmap const&, String const& name);
+ static RefPtr<Layer> try_create_with_size(Image&, Gfx::IntSize const&, String name);
+ static RefPtr<Layer> try_create_with_bitmap(Image&, Gfx::Bitmap const&, String name);
static RefPtr<Layer> try_create_snapshot(Image&, Layer const&);
~Layer() { }
@@ -41,9 +41,9 @@ public:
Gfx::IntRect rect() const { return { {}, size() }; }
String const& name() const { return m_name; }
- void set_name(String const&);
+ void set_name(String);
- void set_bitmap(Gfx::Bitmap& bitmap) { m_bitmap = bitmap; }
+ void set_bitmap(NonnullRefPtr<Gfx::Bitmap> bitmap) { m_bitmap = move(bitmap); }
void did_modify_bitmap(Image&);
@@ -57,8 +57,8 @@ public:
void set_opacity_percent(int);
private:
- Layer(Image&, Gfx::IntSize const&, String const& name);
- Layer(Image&, Gfx::Bitmap const&, String const& name);
+ Layer(Image&, Gfx::IntSize const&, String name);
+ Layer(Image&, Gfx::Bitmap const&, String name);
Image& m_image;