comparison liboctave/array/dim-vector.cc @ 22212:2b487dbe419d

dim-vector.h (ndims): do not return a reference to the rep. * dim-vector.h (ndims): this methods was only made public recently with dcee67d28570 and is not used anywhere else. It would expose the rep for no gain, so always return the int by copy. * dim-vector.cc: access the ndims on rep directly.
author Carnë Draug <carandraug@octave.org>
date Sat, 06 Aug 2016 04:15:07 +0100
parents b571fc85953f
children 1723063e65f3
comparison
equal deleted inserted replaced
22211:6065bd58db2b 22212:2b487dbe419d
61 } 61 }
62 62
63 if (j == 1) 63 if (j == 1)
64 rep[1] = 1; 64 rep[1] = 1;
65 65
66 ndims () = j > 2 ? j : 2; 66 rep[-1] = j > 2 ? j : 2;
67 } 67 }
68 68
69 std::string 69 std::string
70 dim_vector::str (char sep) const 70 dim_vector::str (char sep) const
71 { 71 {