Mercurial > octave
comparison libinterp/corefcn/daspk.cc @ 21118:3ac9f47fb04b
Invert pattern if/code/else/err_XXX to if !/err_XXX/code.
* daspk.cc, dasrt.cc, dassl.cc, data.cc, debug.cc, load-save.cc, lsode.cc,
quad.cc, xnorm.cc, xpow.cc, ov-base-diag.cc, ov-base-mat.cc, ov-base-scalar.cc,
ov-base.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-cell.cc, ov-ch-mat.cc,
ov-class.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-float.cc, ov-flt-cx-mat.cc,
ov-flt-re-mat.cc, ov-intx.h, ov-perm.cc, ov-range.cc, ov-re-mat.cc,
ov-re-sparse.cc, ov-scalar.cc, ov-struct.cc, ov.cc, pt-idx.cc, Array-util.cc,
Array.cc, Sparse.cc, lo-specfun.cc, mx-inlines.cc, oct-binmap.h:
Invert pattern if/code/else/err_XXX to if !/err_XXX/code.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 20 Jan 2016 16:08:30 -0800 |
parents | e39e05d90788 |
children | fcac5dbbf9ed |
comparison
equal
deleted
inserted
replaced
21117:c1df36373272 | 21118:3ac9f47fb04b |
---|---|
83 { | 83 { |
84 err_user_supplied_eval (e, "daspk"); | 84 err_user_supplied_eval (e, "daspk"); |
85 } | 85 } |
86 | 86 |
87 int tlen = tmp.length (); | 87 int tlen = tmp.length (); |
88 if (tlen > 0 && tmp(0).is_defined ()) | 88 if (tlen == 0 || ! tmp(0).is_defined ()) |
89 { | 89 err_user_supplied_eval ("daspk"); |
90 if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) | 90 |
91 { | 91 if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) |
92 warning ("daspk: ignoring imaginary part returned from user-supplied function"); | 92 { |
93 warned_fcn_imaginary = true; | 93 warning ("daspk: ignoring imaginary part returned from user-supplied function"); |
94 } | 94 warned_fcn_imaginary = true; |
95 | 95 } |
96 retval = tmp(0).vector_value (); | 96 |
97 | 97 retval = tmp(0).vector_value (); |
98 if (tlen > 1) | 98 |
99 ires = tmp(1).idx_type_value (); | 99 if (tlen > 1) |
100 | 100 ires = tmp(1).idx_type_value (); |
101 if (retval.is_empty ()) | 101 |
102 err_user_supplied_eval ("daspk"); | 102 if (retval.is_empty ()) |
103 } | |
104 else | |
105 err_user_supplied_eval ("daspk"); | 103 err_user_supplied_eval ("daspk"); |
106 } | 104 } |
107 | 105 |
108 return retval; | 106 return retval; |
109 } | 107 } |
135 { | 133 { |
136 err_user_supplied_eval (e, "daspk"); | 134 err_user_supplied_eval (e, "daspk"); |
137 } | 135 } |
138 | 136 |
139 int tlen = tmp.length (); | 137 int tlen = tmp.length (); |
140 if (tlen > 0 && tmp(0).is_defined ()) | 138 if (tlen == 0 || ! tmp(0).is_defined ()) |
141 { | 139 err_user_supplied_eval ("daspk"); |
142 if (! warned_jac_imaginary && tmp(0).is_complex_type ()) | 140 |
143 { | 141 if (! warned_jac_imaginary && tmp(0).is_complex_type ()) |
144 warning ("daspk: ignoring imaginary part returned from user-supplied jacobian function"); | 142 { |
145 warned_jac_imaginary = true; | 143 warning ("daspk: ignoring imaginary part returned from user-supplied jacobian function"); |
146 } | 144 warned_jac_imaginary = true; |
147 | 145 } |
148 retval = tmp(0).matrix_value (); | 146 |
149 | 147 retval = tmp(0).matrix_value (); |
150 if (retval.is_empty ()) | 148 |
151 err_user_supplied_eval ("daspk"); | 149 if (retval.is_empty ()) |
152 } | |
153 else | |
154 err_user_supplied_eval ("daspk"); | 150 err_user_supplied_eval ("daspk"); |
155 } | 151 } |
156 | 152 |
157 return retval; | 153 return retval; |
158 } | 154 } |