Mercurial > hg > octave-lojdl
changeset 1135:32cb143658a6
[project @ 1995-02-23 23:55:22 by jwe]
author | jwe |
---|---|
date | Thu, 23 Feb 1995 23:55:27 +0000 |
parents | d65e3b59e07c |
children | f0c564a57b2c |
files | liboctave/idx-vector.cc liboctave/idx-vector.h |
diffstat | 2 files changed, 4 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -37,6 +37,7 @@ idx_vector::idx_vector (const idx_vector& a) { + data = 0; initialized = a.initialized; len = a.len; @@ -53,8 +54,6 @@ max_val = a.max_val; min_val = a.min_val; } - else - data = 0; } static inline int @@ -69,6 +68,7 @@ idx_vector::idx_vector (const Matrix& m, int do_ftn_idx, const char *rc, int z_len) { + data = 0; initialized = 0; int nr = m.rows (); @@ -77,7 +77,6 @@ if (nr == 0 || nc == 0) { len = 0; - data =0; num_zeros = 0; num_ones = 0; one_zero = 0; @@ -117,6 +116,7 @@ idx_vector::idx_vector (const Range& r) { + data = 0; initialized = 0; len = r.nelem (); @@ -128,7 +128,6 @@ } else if (len == 0) { - data = 0; num_zeros = 0; num_ones = 0; one_zero = 0;
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -89,7 +89,7 @@ inline idx_vector::idx_vector (void) { len = 0; - data = (int *) 0; + data = 0; num_zeros = 0; num_ones = 0; one_zero = 0; @@ -99,12 +99,6 @@ inline idx_vector::~idx_vector (void) { delete [] data; - data = (int *) 0; - num_zeros = 0; - num_ones = 0; - len = 0; - one_zero = 0; - initialized = 0; } inline idx_vector::operator void * () const