changeset 13704:6f779cc391fb

More 64bit integer type fixes for bsxfun-defs.cc
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Fri, 14 Oct 2011 17:30:13 -0500
parents 22ce748da25f
children 2da28f71de80
files liboctave/bsxfun-defs.cc scripts/image/imshow.m
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/bsxfun-defs.cc	Fri Oct 14 23:19:06 2011 +0100
+++ b/liboctave/bsxfun-defs.cc	Fri Oct 14 17:30:13 2011 -0500
@@ -69,8 +69,7 @@
   R *rvec = retval.fortran_vec ();
 
   // Fold the common leading dimensions.
-  int start;
-  octave_idx_type ldr = 1;
+  octave_idx_type start, ldr = 1;
   for (start = 0; start < nd; start++)
     {
       if (dvx(start) != dvy(start))
--- a/scripts/image/imshow.m	Fri Oct 14 23:19:06 2011 +0100
+++ b/scripts/image/imshow.m	Fri Oct 14 17:30:13 2011 -0500
@@ -115,6 +115,12 @@
     endif
   endwhile
 
+  ## Check for complex images.
+  if (iscomplex (im))
+    warning ("imshow: only showing real part of complex image");
+    im = real (im);
+  endif
+
   ## Set default display range if display_range not set yet.
   if (isempty (display_range))
     display_range = [min(im(:)), max(im(:))];
@@ -130,12 +136,6 @@
     endswitch
   endif
 
-  ## Check for complex images.
-  if (iscomplex (im))
-    warning ("imshow: only showing real part of complex image");
-    im = real (im);
-  endif
-
   nans = isnan (im(:));
   if (any (nans))
     warning ("Octave:imshow-NaN",