diff libinterp/octave-value/ov-base.h @ 17870:1d2e709bbbda

rework short_disp methods * ov.h (octave_value::short_disp): Pass std::ostream as argument instead of returning std::string. Change all uses. * ov-base.h (octave_base_value::short_disp): Likewise. Change all derived classes. * ov-base-scalar.cc (octave_base_scalar<ST>::short_disp): Strip leading whitepace from number. * ov-base-mat.cc (octave_base_matrix<MT>::short_disp): Strip leading whitepace from numbers.
author John W. Eaton <jwe@octave.org>
date Thu, 07 Nov 2013 00:52:48 -0500
parents ebb3ef964372
children e473c4853afc
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.h	Sun Oct 27 13:03:33 2013 +0100
+++ b/libinterp/octave-value/ov-base.h	Thu Nov 07 00:52:48 2013 -0500
@@ -618,7 +618,7 @@
   print_with_name (std::ostream& output_buf, const std::string& name,
                    bool print_padding = true);
 
-  virtual std::string short_disp (void) const { return "..."; }
+  virtual void short_disp (std::ostream& os) const { os << "..."; }
 
   virtual void print_info (std::ostream& os, const std::string& prefix) const;