# HG changeset patch # User jwe # Date 1094685905 0 # Node ID ce4e3d39d05bc14e3dbe9a1d9c2c210726441d8e # Parent 8719102eb804739aa973446e17bc01accd285d31 [project @ 2004-09-08 23:25:05 by jwe] diff -r 8719102eb804 -r ce4e3d39d05b liboctave/Array.h --- a/liboctave/Array.h Wed Sep 08 23:13:24 2004 +0000 +++ b/liboctave/Array.h Wed Sep 08 23:25:05 2004 +0000 @@ -224,7 +224,7 @@ Array (const Array& a, const dim_vector& dv); - ~Array (void); + virtual ~Array (void); Array& operator = (const Array& a) { diff -r 8719102eb804 -r ce4e3d39d05b liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Sep 08 23:13:24 2004 +0000 +++ b/liboctave/ChangeLog Wed Sep 08 23:25:05 2004 +0000 @@ -1,3 +1,11 @@ +2004-09-08 John W. Eaton + + * Array.h (Array::~Array): Declare virtual. + + * idx-vector.h (idx_vector::idx_vector): Initialize rep in member + initializaion list. Don't set rep->count since the rep + constructor does that. + 2004-09-07 John W. Eaton * data-conv.cc (oct_data_conv::string_to_data_type): Handle dt_logical. diff -r 8719102eb804 -r ce4e3d39d05b liboctave/idx-vector.h --- a/liboctave/idx-vector.h Wed Sep 08 23:13:24 2004 +0000 +++ b/liboctave/idx-vector.h Wed Sep 08 23:25:05 2004 +0000 @@ -191,79 +191,31 @@ public: - idx_vector (void) - { - rep = new idx_vector_rep (); - rep->count = 1; - } + idx_vector (void) : rep (new idx_vector_rep ()) { } - idx_vector (const ColumnVector& v) - { - rep = new idx_vector_rep (v); - rep->count = 1; - } + idx_vector (const ColumnVector& v) : rep (new idx_vector_rep (v)) { } - idx_vector (const NDArray& nda) - { - rep = new idx_vector_rep (nda); - rep->count = 1; - } + idx_vector (const NDArray& nda) : rep (new idx_vector_rep (nda)) { } template - idx_vector (const intNDArray& inda) - { - rep = new idx_vector_rep (inda); - rep->count = 1; - } + idx_vector (const intNDArray& inda) : rep (new idx_vector_rep (inda)) { } - idx_vector (const Range& r) - { - rep = new idx_vector_rep (r); - rep->count = 1; - } + idx_vector (const Range& r) : rep (new idx_vector_rep (r)) { } - idx_vector (double d) - { - rep = new idx_vector_rep (d); - rep->count = 1; - } + idx_vector (double d) : rep (new idx_vector_rep (d)) { } - idx_vector (int i) - { - rep = new idx_vector_rep (i); - rep->count = 1; - } + idx_vector (int i) : rep (new idx_vector_rep (i)) { } - idx_vector (char c) - { - rep = new idx_vector_rep (c); - rep->count = 1; - } + idx_vector (char c) : rep (new idx_vector_rep (c)) { } - idx_vector (bool b) - { - rep = new idx_vector_rep (b); - rep->count = 1; - } + idx_vector (bool b) : rep (new idx_vector_rep (b)) { } template - idx_vector (const octave_int& i) - { - rep = new idx_vector_rep (i); - rep->count = 1; - } + idx_vector (const octave_int& i) : rep (new idx_vector_rep (i)) { } - idx_vector (const boolNDArray& bnda) - { - rep = new idx_vector_rep (bnda); - rep->count = 1; - } + idx_vector (const boolNDArray& bnda) : rep (new idx_vector_rep (bnda)) { } - idx_vector (const idx_vector& a) - { - rep = a.rep; - rep->count++; - } + idx_vector (const idx_vector& a) : rep (a.rep) { rep->count++; } ~idx_vector (void) {