From a039c8ad36779903571419cb06cd052f8fc41512 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 29 Mar 2022 17:40:04 +0200 Subject: refactor: use trailing return types --- src/engine/data/bounds.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/engine/data/bounds.cpp') diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp index 1a8c4d0..ca67008 100644 --- a/src/engine/data/bounds.cpp +++ b/src/engine/data/bounds.cpp @@ -5,7 +5,7 @@ Bounds::Bounds(const BoundsOptions &options) noexcept { } -Bounds::Value Bounds::get_width() const noexcept +auto Bounds::get_width() const noexcept -> Bounds::Value { return _width; } @@ -15,7 +15,7 @@ void Bounds::set_width(Bounds::Value width) noexcept _width = width; } -Bounds::Value Bounds::get_height() const noexcept +auto Bounds::get_height() const noexcept -> Bounds::Value { return _height; } @@ -25,7 +25,7 @@ void Bounds::set_height(Bounds::Value height) noexcept _height = height; } -CoordsValidation Bounds::validate_coords(const Vector2 &coords) const noexcept +auto Bounds::validate_coords(const Vector2 &coords) const noexcept -> CoordsValidation { if (static_cast(coords.get_x()) >= _width) { @@ -50,7 +50,7 @@ CoordsValidation Bounds::validate_coords(const Vector2 &coords) const noexcept return CoordsValidation::VALID; } -const Bounds &Bounds::operator*=(const Bounds &rhs) noexcept +auto Bounds::operator*=(const Bounds &rhs) noexcept -> const Bounds & { _width *= rhs._width; _height *= rhs._height; @@ -58,7 +58,7 @@ const Bounds &Bounds::operator*=(const Bounds &rhs) noexcept return *this; } -const Bounds &Bounds::operator+=(const Bounds &rhs) noexcept +auto Bounds::operator+=(const Bounds &rhs) noexcept -> const Bounds & { _width += rhs._width; _height += rhs._height; @@ -66,7 +66,7 @@ const Bounds &Bounds::operator+=(const Bounds &rhs) noexcept return *this; } -const Bounds &Bounds::operator-=(const Bounds &rhs) noexcept +auto Bounds::operator-=(const Bounds &rhs) noexcept -> const Bounds & { _width -= rhs._width; _height -= rhs._height; @@ -74,7 +74,7 @@ const Bounds &Bounds::operator-=(const Bounds &rhs) noexcept return *this; } -Bounds Bounds::operator-(const Bounds &rhs) const noexcept +auto Bounds::operator-(const Bounds &rhs) const noexcept -> Bounds { auto new_bounds = Bounds(*this); -- cgit v1.2.3-18-g5258