Mercurial > hg > octave-nkf
diff liboctave/bsxfun-defs.cc @ 13700:782dc237a02d
Pass correct integer type to std::max in bsxfun-defs.cc
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Thu, 13 Oct 2011 22:05:57 -0500 |
parents | aa4a23337a0f |
children | 6f779cc391fb |
line wrap: on
line diff
--- a/liboctave/bsxfun-defs.cc +++ b/liboctave/bsxfun-defs.cc @@ -98,7 +98,7 @@ } dim_vector cdvx = dvx.cumulative (), cdvy = dvy.cumulative (); // Nullify singleton dims to achieve a spread effect. - for (int i = std::max (start, 1); i < nd; i++) + for (int i = std::max (start, octave_idx_type (1)); i < nd; i++) { if (dvx(i) == 1) cdvx(i-1) = 0; @@ -176,7 +176,7 @@ dim_vector cdvx = dvx.cumulative (); // Nullify singleton dims to achieve a spread effect. - for (int i = std::max (start, 1); i < nd; i++) + for (int i = std::max (start, octave_idx_type (1)); i < nd; i++) { if (dvx(i) == 1) cdvx(i-1) = 0;