Mercurial > octave-dspies
comparison liboctave/fMatrix.cc @ 8956:d91fa4b20bbb
ensure nonnegative char -> real conversion
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 11 Mar 2009 10:31:08 +0100 |
parents | eb63fbe60fab |
children | dc07bc4157b8 |
comparison
equal
deleted
inserted
replaced
8955:6d3fcbf89267 | 8956:d91fa4b20bbb |
---|---|
272 FloatMatrix::FloatMatrix (const charMatrix& a) | 272 FloatMatrix::FloatMatrix (const charMatrix& a) |
273 : MArray2<float> (a.rows (), a.cols ()) | 273 : MArray2<float> (a.rows (), a.cols ()) |
274 { | 274 { |
275 for (octave_idx_type i = 0; i < a.rows (); i++) | 275 for (octave_idx_type i = 0; i < a.rows (); i++) |
276 for (octave_idx_type j = 0; j < a.cols (); j++) | 276 for (octave_idx_type j = 0; j < a.cols (); j++) |
277 elem (i, j) = a.elem (i, j); | 277 elem (i, j) = static_cast<unsigned char> (a.elem (i, j)); |
278 } | 278 } |
279 | 279 |
280 bool | 280 bool |
281 FloatMatrix::operator == (const FloatMatrix& a) const | 281 FloatMatrix::operator == (const FloatMatrix& a) const |
282 { | 282 { |