Mercurial > hg > octave-shane
changeset 10389:8a551f02f10d
oct-convn.cc (convolve): cast int constant to octave_idx_type in call to std::max
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 03 Mar 2010 12:32:30 -0500 |
parents | 5af0b4bb384d |
children | ad0b54ae206a |
files | liboctave/ChangeLog liboctave/oct-convn.cc |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2010-03-03 John W. Eaton <jwe@octave.org> + + * oct-convn.cc (convolve): Cast int constant to octave_idx_type in + call to std::max. + 2010-03-03 Jaroslav Hajek <highegg@gmail.com> * oct-convn.cc (convolve_2d_axpy_kernel, convolve_2d_axpy): Remove.
--- a/liboctave/oct-convn.cc +++ b/liboctave/oct-convn.cc @@ -118,9 +118,11 @@ for (int i = 0; i < nd; i++) { if (ct == convn_valid) - cdims(i) = std::max (adims(i) - bdims(i) + 1, 0); + cdims(i) = std::max (adims(i) - bdims(i) + 1, + static_cast<octave_idx_type> (0)); else - cdims(i) = std::max (adims(i) + bdims(i) - 1, 0); + cdims(i) = std::max (adims(i) + bdims(i) - 1, + static_cast<octave_idx_type> (0)); } MArray<T> c (cdims, T());