comparison src/ov-str-mat.cc @ 8168:dadf478ddc42

fix empty string assignment
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 30 Sep 2008 09:19:43 +0200
parents 26d8a92644de
children c777f3ce02d8
comparison
equal deleted inserted replaced
8167:17352ccd860e 8168:dadf478ddc42
133 } 133 }
134 134
135 return retval; 135 return retval;
136 } 136 }
137 137
138 void
139 octave_char_matrix_str::assign (const octave_value_list& idx,
140 const charMatrix& rhs)
141 {
142 octave_idx_type len = idx.length ();
143
144 // FIXME
145 charMatrix tmp = rhs;
146 if (tmp.rows () == 1 && tmp.columns () == 0)
147 tmp.resize (0, 0);
148
149 for (octave_idx_type i = 0; i < len; i++)
150 matrix.set_index (idx(i).index_vector ());
151
152 ::assign (matrix, tmp, Vstring_fill_char);
153 }
154
155 octave_value 138 octave_value
156 octave_char_matrix_str::resize (const dim_vector& dv, bool fill) const 139 octave_char_matrix_str::resize (const dim_vector& dv, bool fill) const
157 { 140 {
158 charNDArray retval (matrix); 141 charNDArray retval (matrix);
159 if (fill) 142 if (fill)