Skip to content
Snippets Groups Projects
Commit b2993c50 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fullMatrix : scale(0) in resize so that fullMatrix m(); m.resize(ni,nj); is...

fullMatrix : scale(0) in resize so that fullMatrix m(); m.resize(ni,nj); is equivalent to fullMatrix m(ni,nj);
parent b61ce109
No related branches found
No related tags found
No related merge requests found
...@@ -152,12 +152,14 @@ class fullMatrix ...@@ -152,12 +152,14 @@ class fullMatrix
if (_own_data && _data) delete[] _data; if (_own_data && _data) delete[] _data;
_data = new scalar[_r * _c]; _data = new scalar[_r * _c];
_own_data = true; _own_data = true;
scale(0.);
return true; return true;
} }
else{ else{
_r = r; _r = r;
_c = c; _c = c;
} }
scale(0.);
return false; // no reallocation return false; // no reallocation
} }
void setAsProxy(const fullMatrix<scalar> &original) void setAsProxy(const fullMatrix<scalar> &original)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment