From 172f66fec79d6272ddbf832ef0bc7257494a0b05 Mon Sep 17 00:00:00 2001 From: kradchen Date: Tue, 16 May 2023 11:39:19 +0800 Subject: [PATCH] Add const operator[] to Matrix. --- src/Matrix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Matrix.cpp b/src/Matrix.cpp index 0f74365..d06bf4e 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -471,6 +471,8 @@ namespace Aurora { } double& Matrix::operator[](size_t index) { return getData()[index];} + double Matrix::operator[](size_t index) const { return getData()[index];} + void Matrix::printf() { if(isNull())