changeset 21358:f2ae78f5827f

Resolve compile time issues, when octave_idx_type is long. * libinterp/corefcn/debug.cc (bp_table::dbstop_process_map_args): Cell.index requires idx_vector, which cannot be resolved from an integer constant. * libinterp/dldfcn/__magick_read__.cc (read_indexed_images): Value "3" is an integer constant, thus std::min(long int,int) is ambiguous.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Fri, 26 Feb 2016 16:01:22 +0100
parents d00efda9bb92
children 8e94a86ca648
files libinterp/corefcn/debug.cc libinterp/dldfcn/__magick_read__.cc
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc	Fri Feb 26 06:27:04 2016 -0500
+++ b/libinterp/corefcn/debug.cc	Fri Feb 26 16:01:22 2016 +0100
@@ -479,7 +479,7 @@
     fail = (U.numel () > 1);
   else
     {
-      Array<octave_value> W = U.index (0);
+      Array<octave_value> W = U.index (static_cast<octave_idx_type> (0));
       if (W.numel () == 0 || W(0).length () == 0)
         Vdebug_on_error = 1;    // like "dbstop if error" with no identifier
       else if (! W(0).is_cell ())
@@ -505,7 +505,7 @@
     fail = (U.numel () > 1);
   else
     {
-      Array<octave_value> W = U.index (0);
+      Array<octave_value> W = U.index (static_cast<octave_idx_type> (0));
       if (W.numel () == 0 || W(0).length () == 0)
         Vdebug_on_caught = 1;    // like "dbstop if caught error" with no ID
       else if (! W(0).is_cell ())
@@ -531,7 +531,7 @@
     fail = (U.numel () > 1);
   else
     {
-      Array<octave_value> W = U.index (0);
+      Array<octave_value> W = U.index (static_cast<octave_idx_type> (0));
       if (W.numel () == 0 || W(0).length () == 0)
         Vdebug_on_warning = 1;    // like "dbstop if warning" with no identifier
       else if (! W(0).is_cell ())
--- a/libinterp/dldfcn/__magick_read__.cc	Fri Feb 26 06:27:04 2016 -0500
+++ b/libinterp/dldfcn/__magick_read__.cc	Fri Feb 26 16:01:22 2016 +0100
@@ -218,7 +218,7 @@
 {
   typedef typename T::element_type P;
 
-  octave_value_list retval (nargout > 1 ? std::min (nargout, 3) : 1);
+  octave_value_list retval (1);
 
   std::map<std::string, octave_idx_type> region = calculate_region (options);
   const octave_idx_type nFrames = frameidx.numel ();