changeset 20202:b7ee5cefa9d6 stable

Update make_int example to current octave_base_value API (bug #45136) * make_int.cc (octave_integer::print): Make non-const. Add a newline for consistency with core library conventions.
author Mike Miller <mtmiller@octave.org>
date Mon, 18 May 2015 19:14:41 -0400
parents f5d9e57d4380
children 935832827f47
files examples/code/make_int.cc
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/examples/code/make_int.cc	Sun May 17 13:56:00 2015 -0700
+++ b/examples/code/make_int.cc	Mon May 18 19:14:41 2015 -0400
@@ -102,7 +102,7 @@
 
   void decrement (void) { --scalar; }
 
-  void print (std::ostream& os, bool pr_as_read_syntax = false) const;
+  void print (std::ostream& os, bool pr_as_read_syntax = false);
 
 private:
 
@@ -113,10 +113,10 @@
 };
 
 void
-octave_integer::print (std::ostream& os, bool pr_as_read_syntax) const
+octave_integer::print (std::ostream& os, bool pr_as_read_syntax)
 {
   os << scalar;
-  // octave_print_internal (os, scalar, pr_as_read_syntax);
+  newline (os);
 }
 
 #ifdef DEFUNOP_OP