comparison libinterp/parse-tree/pt-select.cc @ 20587:f90c8372b7ba

eliminate many more simple uses of error_state * Cell.cc, __ichol__.cc, __ilu__.cc, balance.cc, bsxfun.cc, colloc.cc, det.cc, dlmread.cc, dynamic-ld.cc, eig.cc, fft.cc, fft2.cc, fftn.cc, gcd.cc, getgrent.cc, getpwent.cc, givens.cc, hess.cc, input.cc, levenshtein.cc, load-path.cc, lookup.cc, ls-mat-ascii.cc, ls-mat4.cc, lsode.cc, lu.cc, max.cc, md5sum.cc, mex.cc, pager.cc, pinv.cc, pr-output.cc, qz.cc, schur.cc, sparse.cc, sqrtm.cc, str2double.cc, strfns.cc, sub2ind.cc, sysdep.cc, time.cc, toplev.cc, tril.cc, tsearch.cc, typecast.cc, __init_gnuplot__.cc, __magick_read__.cc, __osmesa_print__.cc, amd.cc, audiodevinfo.cc, dmperm.cc, fftw.cc, symrcm.cc, ov-base-diag.cc, ov-base-sparse.cc, ov-base.cc, ov-bool-sparse.cc, ov-builtin.cc, ov-complex.cc, ov-cx-diag.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-diag.cc, ov-flt-cx-mat.cc, ov-flt-re-diag.cc, ov-flt-re-mat.cc, ov-lazy-idx.cc, ov-mex-fcn.cc, ov-perm.cc, ov-range.cc, ov-re-diag.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.cc, ov-str-mat.cc, op-bm-b.cc, op-bm-bm.cc, op-sbm-b.cc, op-sbm-bm.cc, op-str-m.cc, op-str-s.cc, oct-parse.in.yy, pt-cbinop.cc, pt-colon.cc, pt-decl.cc, pt-exp.cc, pt-id.cc, pt-misc.cc, pt-select.cc, pt-unop.cc: Eliminate simple uses of error_state.
author John W. Eaton <jwe@octave.org>
date Mon, 05 Oct 2015 19:29:36 -0400
parents 4197fc428c7d
children
comparison
equal deleted inserted replaced
20586:b7ac1e94266e 20587:f90c8372b7ba
121 bool 121 bool
122 tree_switch_case::label_matches (const octave_value& val) 122 tree_switch_case::label_matches (const octave_value& val)
123 { 123 {
124 octave_value label_value = label->rvalue1 (); 124 octave_value label_value = label->rvalue1 ();
125 125
126 if (! error_state && label_value.is_defined ()) 126 if (label_value.is_defined ())
127 { 127 {
128 if (label_value.is_cell ()) 128 if (label_value.is_cell ())
129 { 129 {
130 Cell cell (label_value.cell_value ()); 130 Cell cell (label_value.cell_value ());
131 131
133 { 133 {
134 for (octave_idx_type j = 0; j < cell.columns (); j++) 134 for (octave_idx_type j = 0; j < cell.columns (); j++)
135 { 135 {
136 bool match = val.is_equal (cell(i,j)); 136 bool match = val.is_equal (cell(i,j));
137 137
138 if (error_state) 138 if (match)
139 return false;
140 else if (match)
141 return true; 139 return true;
142 } 140 }
143 } 141 }
144 } 142 }
145 else 143 else
146 { 144 return val.is_equal (label_value);
147 bool match = val.is_equal (label_value);
148
149 if (error_state)
150 return false;
151 else
152 return match;
153 }
154 } 145 }
155 146
156 return false; 147 return false;
157 } 148 }
158 149