diff --git a/Userland/Libraries/LibGfx/Size.cpp b/Userland/Libraries/LibGfx/Size.cpp index 48df1887fd3..8d25838a48f 100644 --- a/Userland/Libraries/LibGfx/Size.cpp +++ b/Userland/Libraries/LibGfx/Size.cpp @@ -27,7 +27,7 @@ String FloatSize::to_string() const namespace IPC { -bool encode(Encoder& encoder, const Gfx::IntSize& size) +bool encode(Encoder& encoder, Gfx::IntSize const& size) { encoder << size.width() << size.height(); return true; diff --git a/Userland/Libraries/LibGfx/Size.h b/Userland/Libraries/LibGfx/Size.h index 958f80d7de8..802c5ea03d5 100644 --- a/Userland/Libraries/LibGfx/Size.h +++ b/Userland/Libraries/LibGfx/Size.h @@ -32,7 +32,7 @@ public: } template - explicit Size(const Size& other) + explicit Size(Size const& other) : m_width(other.width()) , m_height(other.height()) { @@ -54,10 +54,10 @@ public: m_height *= dy; } - void transform_by(const AffineTransform& transform) { *this = transform.map(*this); } + void transform_by(AffineTransform const& transform) { *this = transform.map(*this); } ALWAYS_INLINE void scale_by(T dboth) { scale_by(dboth, dboth); } - ALWAYS_INLINE void scale_by(const Point& s) { scale_by(s.x(), s.y()); } + ALWAYS_INLINE void scale_by(Point const& s) { scale_by(s.x(), s.y()); } Size scaled_by(T dx, T dy) const { @@ -73,14 +73,14 @@ public: return size; } - Size scaled_by(const Point& s) const + Size scaled_by(Point const& s) const { Size size = *this; size.scale_by(s); return size; } - Size transformed_by(const AffineTransform& transform) const + Size transformed_by(AffineTransform const& transform) const { Size size = *this; size.transform_by(transform); @@ -88,31 +88,31 @@ public: } template - bool contains(const Size& other) const + bool contains(Size const& other) const { return other.m_width <= m_width && other.m_height <= m_height; } template - bool operator==(const Size& other) const + bool operator==(Size const& other) const { return width() == other.width() && height() == other.height(); } template - bool operator!=(const Size& other) const + bool operator!=(Size const& other) const { return !(*this == other); } - Size& operator-=(const Size& other) + Size& operator-=(Size const& other) { m_width -= other.m_width; m_height -= other.m_height; return *this; } - Size& operator+=(const Size& other) + Size& operator+=(Size const& other) { m_width += other.m_width; m_height += other.m_height; @@ -178,7 +178,7 @@ namespace AK { template struct Formatter> : Formatter { - void format(FormatBuilder& builder, const Gfx::Size& value) + void format(FormatBuilder& builder, Gfx::Size const& value) { Formatter::format(builder, value.to_string()); } @@ -188,7 +188,7 @@ struct Formatter> : Formatter { namespace IPC { -bool encode(Encoder&, const Gfx::IntSize&); +bool encode(Encoder&, Gfx::IntSize const&); bool decode(Decoder&, Gfx::IntSize&); }