From 7aa1db5f27fc3d21089b2f7657ce51a7387cc547 Mon Sep 17 00:00:00 2001 From: Orange Date: Sun, 20 Oct 2024 12:39:32 +0300 Subject: [PATCH] forgot to optimize --- include/omath/Mat.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/omath/Mat.h b/include/omath/Mat.h index e20410e..188aea0 100644 --- a/include/omath/Mat.h +++ b/include/omath/Mat.h @@ -46,17 +46,13 @@ namespace omath constexpr Mat(const Mat& other) { - for (size_t i = 0; i < Rows; ++i) - for (size_t j = 0; j < Columns; ++j) - At(i, j) = other.At(i, j); + m_data = other.m_data; } constexpr Mat(Mat&& other) noexcept { - for (size_t i = 0; i < Rows; ++i) - for (size_t j = 0; j < Columns; ++j) - At(i, j) = other.At(i, j) ; + m_data = std::move(other.m_data); } [[nodiscard]]