changeset 21827:2781d6efa88f

Fix build error with --enable-64 * Array.cc (Array<T>::nth_element): Ensure arguments to std::min have the same type. (Array<T>::cat): Ensure arguments to std::max have the same type.
author Mike Miller <mtmiller@octave.org>
date Mon, 06 Jun 2016 07:42:55 -0700
parents f3455f8ff86d
children 590c39b94618
files liboctave/array/Array.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/Array.cc	Sun Jun 05 15:01:31 2016 -0700
+++ b/liboctave/array/Array.cc	Mon Jun 06 07:42:55 2016 -0700
@@ -2341,7 +2341,7 @@
 
   dv(dim) = std::min (nn, ns);
   dv.chop_trailing_singletons ();
-  dim = std::min (dv.ndims (), dim);
+  dim = std::min (dv.ndims (), static_cast<octave_idx_type> (dim));
 
   Array<T> m (dv);
 
@@ -2684,7 +2684,7 @@
   if (retval.is_empty ())
     return retval;
 
-  int nidx = std::max (dv.ndims (), dim + 1);
+  int nidx = std::max (dv.ndims (), static_cast<octave_idx_type> (dim + 1));
   Array<idx_vector> idxa (dim_vector (nidx, 1), idx_vector::colon);
   octave_idx_type l = 0;