Exercise 5

bug fix
This commit is contained in:
Alessandro Ferro
2021-05-31 17:46:48 +02:00
parent 4aa82d6108
commit 980fce4cb7
6 changed files with 26 additions and 18 deletions

View File

@ -72,7 +72,13 @@ bool MatrixVec<Data>::operator!=(const MatrixVec& toCompare) const noexcept{
template <typename Data>
void MatrixVec<Data>::RowResize(const ulong& newdim){
Vector<Data>::Resize(newdim);
if(newdim == 0){
Clear();
}else{
Vector<Data>::Resize(newdim * columns);
rows = newdim;
size = newdim * columns;
}
}
template <typename Data>