Mercurial > hg > octave-nkf
diff examples/code/make_int.cc @ 20412: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 | 76478d2da117 |
children | 2f8500ca91d3 |
line wrap: on
line diff
--- a/examples/code/make_int.cc +++ b/examples/code/make_int.cc @@ -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