aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/matrix.tpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-29 17:40:04 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:57 +0200
commita039c8ad36779903571419cb06cd052f8fc41512 (patch)
tree4fdced6941a048bdd4b032fab7012bca00a6028e /src/engine/graphics/matrix.tpp
parentacf72075ed32e5a679d49ffedc0c28d8ac2aea8b (diff)
refactor: use trailing return types
Diffstat (limited to 'src/engine/graphics/matrix.tpp')
-rw-r--r--src/engine/graphics/matrix.tpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine/graphics/matrix.tpp b/src/engine/graphics/matrix.tpp
index e0e65bb..527c61f 100644
--- a/src/engine/graphics/matrix.tpp
+++ b/src/engine/graphics/matrix.tpp
@@ -49,7 +49,7 @@ void Matrix<Element>::fill(Element element) noexcept
}
template <typename Element>
-Element Matrix<Element>::get(const Vector2 &pos) const noexcept
+auto Matrix<Element>::get(const Vector2 &pos) const noexcept -> Element
{
auto x = static_cast<std::size_t>(pos.get_x());
@@ -70,31 +70,31 @@ void Matrix<Element>::set(const Vector2 &pos, Element element) noexcept
}
template <typename Element>
-uint32_t Matrix<Element>::get_row_cnt() const noexcept
+auto Matrix<Element>::get_row_cnt() const noexcept -> uint32_t
{
return _row_cnt;
}
template <typename Element>
-uint32_t Matrix<Element>::get_column_cnt() const noexcept
+auto Matrix<Element>::get_column_cnt() const noexcept -> uint32_t
{
return _column_cnt;
}
template <typename Element>
-MatrixIterator<Element> Matrix<Element>::begin() const noexcept
+auto Matrix<Element>::begin() const noexcept -> MatrixIterator<Element>
{
return MatrixIterator(_matrix, _column_cnt);
}
template <typename Element>
-MatrixIterator<Element> Matrix<Element>::end() const noexcept
+auto Matrix<Element>::end() const noexcept -> MatrixIterator<Element>
{
return MatrixIterator(_matrix + _row_cnt, _column_cnt);
}
template <typename Element>
-Matrix<Element> &Matrix<Element>::operator=(const Matrix &rhs) noexcept
+auto Matrix<Element>::operator=(const Matrix &rhs) noexcept -> Matrix<Element> &
{
if (&rhs != this)
{
@@ -111,7 +111,7 @@ Matrix<Element> &Matrix<Element>::operator=(const Matrix &rhs) noexcept
}
template <typename Element>
-Matrix<Element> &Matrix<Element>::operator=(Matrix &&rhs) noexcept
+auto Matrix<Element>::operator=(Matrix &&rhs) noexcept -> Matrix<Element> &
{
if (&rhs != this)
{