diff liboctave/oct-convn.cc @ 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 141b3fb5cef7
line wrap: on
line diff
--- 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());