Mercurial > octave-dspies
comparison libinterp/octave-value/ov-cell.cc @ 18384:bd9d34f28b0f stable
Use std::ostream::fail instead of unsafe implicit bool conversion (bug #41335)
* ls-mat4.cc (save_mat_binary_data): Use std::ostream::fail to return stream
status instead of unsafe implicit bool conversion.
* ov-cell.cc (octave_cell::save_ascii) Likewise.
* ov-class.cc (octave_class::save_ascii, octave_class::save_binary) Likewise.
* ov-fcn-handle.cc (octave_fcn_handle::save_ascii,
octave_fcn_handle::save_binary) Likewise.
* ov-struct.cc (octave_struct::save_ascii, octave_struct::save_binary,
octave_scalar_struct::save_ascii, octave_scalar_struct::save_binary) Likewise.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sat, 25 Jan 2014 01:02:12 -0500 |
parents | 28e9562d708b |
children | 1e148ecdeedd ea0d4dea1a17 |
comparison
equal
deleted
inserted
replaced
18383:abc78c10acb6 | 18384:bd9d34f28b0f |
---|---|
778 | 778 |
779 // Recurse to print sub-value. | 779 // Recurse to print sub-value. |
780 bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); | 780 bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); |
781 | 781 |
782 if (! b) | 782 if (! b) |
783 return os; | 783 return ! os.fail (); |
784 } | 784 } |
785 } | 785 } |
786 else | 786 else |
787 { | 787 { |
788 // Keep this case, rather than use generic code above for backward | 788 // Keep this case, rather than use generic code above for backward |
800 | 800 |
801 // Recurse to print sub-value. | 801 // Recurse to print sub-value. |
802 bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); | 802 bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); |
803 | 803 |
804 if (! b) | 804 if (! b) |
805 return os; | 805 return ! os.fail (); |
806 } | 806 } |
807 | 807 |
808 os << "\n"; | 808 os << "\n"; |
809 } | 809 } |
810 } | 810 } |