Change [] return type to reference
This commit is contained in:
@@ -470,7 +470,7 @@ namespace Aurora {
|
||||
return operatorMxA(&vdPowI, times, std::forward<Matrix&&>(matrix));
|
||||
}
|
||||
|
||||
double Matrix::operator[](size_t index) const { return getData()[index];}
|
||||
double& Matrix::operator[](size_t index) { return getData()[index];}
|
||||
|
||||
void Matrix::printf() {
|
||||
if(isNull())
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace Aurora {
|
||||
Matrix operator==(const Matrix &matrix) const;
|
||||
|
||||
// sub
|
||||
double operator[](size_t index) const;
|
||||
double& operator[](size_t index);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user