changeset 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 dd9b32af0a01
children 46e68badedb8
files liboctave/bsxfun-defs.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;