Mercurial > hg > octave-nkf
comparison src/oct-obj.cc @ 10099:29959c705df2
avoid assignment in condition of if statement
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 13 Jan 2010 20:45:31 -0500 |
parents | 76df75b10c80 |
children | cd96d29c5efa |
comparison
equal
deleted
inserted
replaced
10098:d3451c1496f8 | 10099:29959c705df2 |
---|---|
188 } | 188 } |
189 | 189 |
190 bool | 190 bool |
191 octave_value_list::any_cell (void) const | 191 octave_value_list::any_cell (void) const |
192 { | 192 { |
193 bool retval = false; | |
194 octave_idx_type n = length (); | 193 octave_idx_type n = length (); |
195 | 194 |
196 for (octave_idx_type i = 0; i < n; i++) | 195 for (octave_idx_type i = 0; i < n; i++) |
197 if (retval = elem (i).is_cell ()) | 196 if (elem (i).is_cell ()) |
198 break; | 197 return true; |
199 | 198 |
200 return retval; | 199 return false; |
201 } | 200 } |
202 | 201 |
203 bool | 202 bool |
204 octave_value_list::has_magic_colon (void) const | 203 octave_value_list::has_magic_colon (void) const |
205 { | 204 { |