From b2993c5014bb601d64b70c01767c26be0d9d5f79 Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Wed, 5 May 2010 10:48:28 +0000 Subject: [PATCH] fullMatrix : scale(0) in resize so that fullMatrix m(); m.resize(ni,nj); is equivalent to fullMatrix m(ni,nj); --- Numeric/fullMatrix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h index 01ac94f1a8..9f8e02c5f3 100644 --- a/Numeric/fullMatrix.h +++ b/Numeric/fullMatrix.h @@ -152,12 +152,14 @@ class fullMatrix if (_own_data && _data) delete[] _data; _data = new scalar[_r * _c]; _own_data = true; + scale(0.); return true; } else{ _r = r; _c = c; } + scale(0.); return false; // no reallocation } void setAsProxy(const fullMatrix<scalar> &original) -- GitLab