diff src/ov-cell.cc @ 7622:c195bd0a5c64

treat structs and cells as "constants"
author John W. Eaton <jwe@octave.org>
date Fri, 21 Mar 2008 16:28:47 -0400
parents 8c32f95c2639
children 443a8f5a50fd
line wrap: on
line diff
--- a/src/ov-cell.cc	Fri Mar 21 16:09:01 2008 +0100
+++ b/src/ov-cell.cc	Fri Mar 21 16:28:47 2008 -0400
@@ -65,16 +65,16 @@
   error ("assignment to cell array failed");
 }
 
-octave_value_list
+octave_value
 octave_cell::subsref (const std::string& type,
-		      const std::list<octave_value_list>& idx, int nargout)
+		      const std::list<octave_value_list>& idx)
 {
-  octave_value_list retval;
+  octave_value retval;
 
   switch (type[0])
     {
     case '(':
-      retval(0) = do_index_op (idx.front ());
+      retval = do_index_op (idx.front ());
       break;
 
     case '{':
@@ -86,7 +86,7 @@
 	    Cell tcell = tmp.cell_value ();
 
 	    if (tcell.length () == 1)
-	      retval(0) = tcell(0,0);
+	      retval = tcell(0,0);
 	    else
 	      {
 		octave_idx_type n = tcell.numel ();
@@ -99,7 +99,7 @@
 		    lst(i) = tcell(i);
 		  }
 
-		retval(0) = octave_value (lst, true);
+		retval = octave_value (lst, true);
 	      }
 	  }
       }
@@ -121,7 +121,7 @@
   // octave_user_function::subsref.
 
   if (idx.size () > 1)
-    retval = retval(0).next_subsref (nargout, type, idx);
+    retval = retval.next_subsref (type, idx);
 
   return retval;
 }