Mercurial > octave-libgccjit
comparison liboctave/dMatrix.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 |
---|---|
273 Matrix::Matrix (const charMatrix& a) | 273 Matrix::Matrix (const charMatrix& a) |
274 : MArray2<double> (a.rows (), a.cols ()) | 274 : MArray2<double> (a.rows (), a.cols ()) |
275 { | 275 { |
276 for (octave_idx_type i = 0; i < a.rows (); i++) | 276 for (octave_idx_type i = 0; i < a.rows (); i++) |
277 for (octave_idx_type j = 0; j < a.cols (); j++) | 277 for (octave_idx_type j = 0; j < a.cols (); j++) |
278 elem (i, j) = a.elem (i, j); | 278 elem (i, j) = static_cast<unsigned char> (a.elem (i, j)); |
279 } | 279 } |
280 | 280 |
281 bool | 281 bool |
282 Matrix::operator == (const Matrix& a) const | 282 Matrix::operator == (const Matrix& a) const |
283 { | 283 { |