Mercurial > jwe > octave
comparison libinterp/octave-value/ov-re-sparse.cc @ 21120:499b851fbfae
Replace pattern if/err_XXX/else/code with if/err_XXX/ code.
* schur.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-sparse.cc, ov-float.h,
ov-flt-complex.h, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-range.cc,
ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.h, ov-str-mat.cc, ops.h, pt-idx.cc,
Array.cc, CColVector.cc, CMatrix.cc, CRowVector.cc, MSparse.cc, PermMatrix.cc,
Sparse.cc, dColVector.cc, dMatrix.cc, dRowVector.cc, dSparse.cc,
fCColVector.cc, fCMatrix.cc, fCRowVector.cc, fColVector.cc, fMatrix.cc,
fRowVector.cc:
Replace pattern if/err_XXX/else/code with if/err_XXX/ code.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 20 Jan 2016 16:58:59 -0800 |
parents | 3ac9f47fb04b |
children | fcac5dbbf9ed |
comparison
equal
deleted
inserted
replaced
21119:90cd0f9442d5 | 21120:499b851fbfae |
---|---|
140 { | 140 { |
141 NDArray m = matrix.matrix_value (); | 141 NDArray m = matrix.matrix_value (); |
142 | 142 |
143 if (m.any_element_is_nan ()) | 143 if (m.any_element_is_nan ()) |
144 err_nan_to_logical_conversion (); | 144 err_nan_to_logical_conversion (); |
145 else if (warn && m.any_element_not_one_or_zero ()) | 145 if (warn && m.any_element_not_one_or_zero ()) |
146 warn_logical_conversion (); | 146 warn_logical_conversion (); |
147 | 147 |
148 return boolNDArray (m); | 148 return boolNDArray (m); |
149 } | 149 } |
150 | 150 |
183 SparseBoolMatrix | 183 SparseBoolMatrix |
184 octave_sparse_matrix::sparse_bool_matrix_value (bool warn) const | 184 octave_sparse_matrix::sparse_bool_matrix_value (bool warn) const |
185 { | 185 { |
186 if (matrix.any_element_is_nan ()) | 186 if (matrix.any_element_is_nan ()) |
187 err_nan_to_logical_conversion (); | 187 err_nan_to_logical_conversion (); |
188 else if (warn && matrix.any_element_not_one_or_zero ()) | 188 if (warn && matrix.any_element_not_one_or_zero ()) |
189 warn_logical_conversion (); | 189 warn_logical_conversion (); |
190 | 190 |
191 return mx_el_ne (matrix, 0.0); | 191 return mx_el_ne (matrix, 0.0); |
192 } | 192 } |
193 | 193 |