Matrix icon indicating copy to clipboard operation
Matrix copied to clipboard

[BUG] Add `const` keyword to methods wherever appropriate

Open aniketsharma00411 opened this issue 4 years ago • 5 comments

Note: You can contact @ashok-arora if you face any problem while solving this issue.

It is impossible to work with const Matrix objects as none of the methods are declared const.

Description

Using a const Matrix object I can't even call basic methods like row_length(), col_length(), print(), etc. as none of these are declared const` even though they are not changing the object value.

Expected Behavior

row_length(), col_length() and other methods not changing the object should run when called using a const Matrix object.

Actual Behavior

row_length(), col_length() and other methods not changing the object give error when when called using a const Matrix object.

Possible Fix

Add const keyword to methods which will not change the object value.

aniketsharma00411 avatar Jan 02 '21 08:01 aniketsharma00411

Can I work on this?

nishihere19 avatar Jan 28 '21 08:01 nishihere19

Can I work on this?

Sure! Let me know if you face any difficulty!

ashok-arora avatar Jan 31 '21 07:01 ashok-arora

@nishihere19 Please let us know if you are working on the issue or not.

aniketsharma00411 avatar Feb 03 '21 05:02 aniketsharma00411

Sorry, I have some work at hand these days. I won't be able to work on this.

nishihere19 avatar Feb 03 '21 08:02 nishihere19

No problem

aniketsharma00411 avatar Feb 03 '21 10:02 aniketsharma00411