changeset 8905:24dd61b36591

assign rvalue1 result to octave_value object, not octave_value_list object
author John W. Eaton <jwe@octave.org>
date Tue, 03 Mar 2009 14:02:20 -0500
parents 4de5544a1d1d
children ab87d08d9a1b
files src/ChangeLog src/pt-assign.cc
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Mar 03 13:39:32 2009 +0100
+++ b/src/ChangeLog	Tue Mar 03 14:02:20 2009 -0500
@@ -1,3 +1,9 @@
+2009-03-03  John W. Eaton  <jwe@octave.org>
+
+	* pt-assign.cc (tree_simple_assignment::rvalue1): Assign result of
+	call to rhs->rvalue1() to an octave_value object, not an
+	octave_value_list object.
+
 2009-03-03  Jaroslav Hajek  <highegg@gmail.com>
 
 	* oct-stream.h (octave_stream_list::lookup_cache): New member field.
--- a/src/pt-assign.cc	Tue Mar 03 13:39:32 2009 +0100
+++ b/src/pt-assign.cc	Tue Mar 03 14:02:20 2009 -0500
@@ -184,9 +184,6 @@
   return retval;
 }
 
-// FIXME -- this works, but it would look a little better if
-// it were broken up into a couple of separate functions.
-
 octave_value
 tree_simple_assignment::rvalue1 (int)
 {
@@ -200,12 +197,10 @@
 
   if (rhs)
     {
-      octave_value_list tmp = rhs->rvalue1 ();
+      octave_value rhs_val = rhs->rvalue1 ();
 
-      if (! (error_state || tmp.empty ()))
+      if (! error_state)
 	{
-	  octave_value rhs_val = tmp(0);
-
 	  if (rhs_val.is_undefined ())
 	    {
 	      error ("value on right hand side of assignment is undefined");