# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1318561557 18000 # Node ID 782dc237a02d3f93a9f9fb3375b01153cbe42d2a # Parent dd9b32af0a018c374b6e891ce34ba3794689cf35 Pass correct integer type to std::max in bsxfun-defs.cc diff -r dd9b32af0a01 -r 782dc237a02d liboctave/bsxfun-defs.cc --- a/liboctave/bsxfun-defs.cc Thu Oct 13 23:01:44 2011 +0100 +++ b/liboctave/bsxfun-defs.cc Thu Oct 13 22:05:57 2011 -0500 @@ -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;