Mercurial > octave
diff libinterp/corefcn/pr-output.cc @ 21583:d5963a6e29c2
Use integer output formatting for logicals (bug #47607)
* pr-output.cc (octave_print_internal (ostream&, bool),
octave_print_internal (ostream&, const boolMatrix&)): Cast bool values
to uint8 instead of double for output formatting.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Sat, 02 Apr 2016 15:23:56 -0700 |
parents | 3d60ed163b70 |
children | 5b9868c2e212 |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Fri Apr 01 21:20:23 2016 -0700 +++ b/libinterp/corefcn/pr-output.cc Sat Apr 02 15:23:56 2016 -0700 @@ -2598,7 +2598,7 @@ void octave_print_internal (std::ostream& os, bool d, bool pr_as_read_syntax) { - octave_print_internal (os, double (d), pr_as_read_syntax); + octave_print_internal (os, octave_uint8 (d), pr_as_read_syntax); } // FIXME: write single precision versions of the printing functions. @@ -2781,7 +2781,7 @@ bool pr_as_read_syntax, int extra_indent) { - Matrix tmp (bm); + uint8NDArray tmp (bm); octave_print_internal (os, tmp, pr_as_read_syntax, extra_indent); }