Mercurial > hg > octave-lyh
comparison src/ov-typeinfo.cc @ 11570:57632dea2446
attempt better backward compatibility for Array constructors
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 19 Jan 2011 17:55:56 -0500 |
parents | fd0a3ac60b0e |
children | 12df7854fa7c |
comparison
equal
deleted
inserted
replaced
11569:7e9a111cae20 | 11570:57632dea2446 |
---|---|
34 | 34 |
35 octave_value_typeinfo * | 35 octave_value_typeinfo * |
36 octave_value_typeinfo::instance (0); | 36 octave_value_typeinfo::instance (0); |
37 | 37 |
38 #include <Array.h> | 38 #include <Array.h> |
39 #include <Array3.h> | |
40 | 39 |
41 bool | 40 bool |
42 octave_value_typeinfo::instance_ok (void) | 41 octave_value_typeinfo::instance_ok (void) |
43 { | 42 { |
44 bool retval = true; | 43 bool retval = true; |
189 | 188 |
190 if (i == len) | 189 if (i == len) |
191 { | 190 { |
192 len *= 2; | 191 len *= 2; |
193 | 192 |
194 types.resize (len, 1, std::string ()); | 193 types.resize (dim_vector (len, 1), std::string ()); |
195 | 194 |
196 vals.resize (len, 1, octave_value ()); | 195 vals.resize (dim_vector (len, 1), octave_value ()); |
197 | 196 |
198 unary_ops.resize (static_cast<int> (octave_value::num_unary_ops), len, 0); | 197 unary_ops.resize (dim_vector (octave_value::num_unary_ops, len), 0); |
199 | 198 |
200 non_const_unary_ops.resize | 199 non_const_unary_ops.resize |
201 (static_cast<int> (octave_value::num_unary_ops), len, 0); | 200 (dim_vector (octave_value::num_unary_ops, len), 0); |
202 | 201 |
203 binary_ops.resize (static_cast<int> (octave_value::num_binary_ops), | 202 binary_ops.resize |
204 len, len, 0); | 203 (dim_vector (octave_value::num_binary_ops, len, len), 0); |
205 | 204 |
206 compound_binary_ops.resize (static_cast<int> (octave_value::num_compound_binary_ops), | 205 compound_binary_ops.resize |
207 len, len, 0); | 206 (dim_vector (octave_value::num_compound_binary_ops, len, len), 0); |
208 | 207 |
209 cat_ops.resize (len, len, 0); | 208 cat_ops.resize (dim_vector (len, len), 0); |
210 | 209 |
211 assign_ops.resize (static_cast<int> (octave_value::num_assign_ops), len, len, 0); | 210 assign_ops.resize |
212 | 211 (dim_vector (octave_value::num_assign_ops, len, len), 0); |
213 assignany_ops.resize (static_cast<int> (octave_value::num_assign_ops), len, 0); | 212 |
214 | 213 assignany_ops.resize |
215 pref_assign_conv.resize (len, len, -1); | 214 (dim_vector (octave_value::num_assign_ops, len), 0); |
216 | 215 |
217 type_conv_ops.resize (len, len, 0); | 216 pref_assign_conv.resize (dim_vector (len, len), -1); |
218 | 217 |
219 widening_ops.resize (len, len, 0); | 218 type_conv_ops.resize (dim_vector (len, len), 0); |
219 | |
220 widening_ops.resize (dim_vector (len, len), 0); | |
220 } | 221 } |
221 | 222 |
222 types (i) = t_name; | 223 types (i) = t_name; |
223 | 224 |
224 vals (i) = val; | 225 vals (i) = val; |