mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-14 07:23:26 +00:00
forgot to optimize
This commit is contained in:
@@ -46,17 +46,13 @@ namespace omath
|
|||||||
|
|
||||||
constexpr Mat(const Mat& other)
|
constexpr Mat(const Mat& other)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < Rows; ++i)
|
m_data = other.m_data;
|
||||||
for (size_t j = 0; j < Columns; ++j)
|
|
||||||
At(i, j) = other.At(i, j);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
constexpr Mat(Mat&& other) noexcept
|
constexpr Mat(Mat&& other) noexcept
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < Rows; ++i)
|
m_data = std::move(other.m_data);
|
||||||
for (size_t j = 0; j < Columns; ++j)
|
|
||||||
At(i, j) = other.At(i, j) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
|
|||||||
Reference in New Issue
Block a user