comparison liboctave/Array.h @ 1701:ce16950b6b02

[project @ 1996-01-07 03:15:11 by jwe]
author jwe
date Sun, 07 Jan 1996 03:15:11 +0000
parents e4d94a757f01
children eec2def45457
comparison
equal deleted inserted replaced
1700:e4d94a757f01 1701:ce16950b6b02
70 70
71 ArrayRep<T>& operator = (const ArrayRep<T>& a); 71 ArrayRep<T>& operator = (const ArrayRep<T>& a);
72 72
73 protected: 73 protected:
74 74
75 ArrayRep (T *d, int l) 75 ArrayRep (T *d, int l) : data (d), len (l), count (1) { }
76 {
77 data = d;
78 len = l;
79 count = 1;
80 }
81 76
82 public: 77 public:
83 78
84 ArrayRep (void) 79 ArrayRep (void) : data (0), len (0), count (1) { }
85 {
86 data = 0;
87 len = 0;
88 count = 1;
89 }
90 80
91 ArrayRep (int n); 81 ArrayRep (int n);
92 82
93 ArrayRep (const ArrayRep<T>& a); 83 ArrayRep (const ArrayRep<T>& a);
94 84
293 283
294 ~Array2 (void) { } 284 ~Array2 (void) { }
295 285
296 Array2<T>& operator = (const Array2<T>& a) 286 Array2<T>& operator = (const Array2<T>& a)
297 { 287 {
298 if (this != &a) 288 if (this != &a && rep != a.rep)
299 { 289 {
300 Array<T>::operator = (a); 290 Array<T>::operator = (a);
301 d1 = a.d1; 291 d1 = a.d1;
302 d2 = a.d2; 292 d2 = a.d2;
303 } 293 }
387 377
388 ~Array3 (void) { } 378 ~Array3 (void) { }
389 379
390 Array3<T>& operator = (const Array3<T>& a) 380 Array3<T>& operator = (const Array3<T>& a)
391 { 381 {
392 if (this != &a) 382 if (this != &a && rep != a.rep)
393 { 383 {
394 Array<T>::operator = (a); 384 Array<T>::operator = (a);
395 d1 = a.d1; 385 d1 = a.d1;
396 d2 = a.d2; 386 d2 = a.d2;
397 d3 = a.d3; 387 d3 = a.d3;