diff src/ov-class.cc @ 9521:e08d72bb988e

simplify cloning
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 13 Aug 2009 11:52:07 +0200
parents 610bf90fce2a
children e79470be3ecb
line wrap: on
line diff
--- a/src/ov-class.cc	Thu Aug 13 08:25:02 2009 +0200
+++ b/src/ov-class.cc	Thu Aug 13 11:52:07 2009 +0200
@@ -906,7 +906,7 @@
 
 void
 octave_class::print_with_name (std::ostream&, const std::string& name, 
-			       bool) const
+			       bool)
 {
   octave_value fcn = symbol_table::find_method ("display", class_name ());
 
@@ -914,7 +914,8 @@
     {
       octave_value_list args;
 
-      args(0) = octave_value (clone (), 1);
+      count++;
+      args(0) = octave_value (this);
       
       string_vector arg_names (1);