From fa7e70a437f70303ed9daa487fdc15313f114af5 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 13 May 2024 21:10:23 +0200 Subject: [PATCH] better fill --- src/Matrix.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Matrix.cpp b/src/Matrix.cpp index de8b9f2..9b18995 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -71,11 +71,7 @@ Matrix Matrix::RawVector(std::initializer_list&& a_Elements) { } void Matrix::Fill(Element a_Element) { - for (std::size_t i = 0; i < m_Raws; i++) { - for (std::size_t j = 0; j < m_Columns; j++) { - at(i, j) = a_Element; - } - } + std::fill(GetLineIterator(0), GetLineIterator(m_Raws), a_Element); } void Matrix::Augment(const Matrix& a_Right) {