changeset 9181:86ae7e50dc5d

graphics.cc (array_property::validate): require value to be numeric, not necessarily double
author John W. Eaton <jwe@octave.org>
date Tue, 05 May 2009 13:32:15 -0400
parents 2669527e0ce5
children 23af5910e5f5
files src/ChangeLog src/graphics.cc
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue May 05 13:05:12 2009 -0400
+++ b/src/ChangeLog	Tue May 05 13:32:15 2009 -0400
@@ -1,5 +1,8 @@
 2009-05-05  John W. Eaton  <jwe@octave.org>
 
+	* graphics.cc (array_property::validate): Require object to be any
+	numeric type, not necessarily a double precision value.
+
 	* variables.cc (set_internal_variable): Pass NM in call to error.
 
 2009-05-04  Peter O'Gorman  <pogma@thewrittenword.com>
--- a/src/graphics.cc	Tue May 05 13:05:12 2009 -0400
+++ b/src/graphics.cc	Tue May 05 13:32:15 2009 -0400
@@ -776,7 +776,7 @@
   bool xok = false;
 
   // FIXME -- should we always support []?
-  if (v.is_empty () && v.is_double_type ())
+  if (v.is_empty () && v.is_numeric_type ())
     return true;
 
   // check value type
@@ -788,7 +788,7 @@
           xok = true;
     }
   else
-    xok = v.is_double_type ();
+    xok = v.is_numeric_type ();
 
   if (xok)
     {