Mercurial > octave-antonio
diff 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 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-cell.cc Thu Jan 16 22:49:52 2014 -0500 +++ b/libinterp/octave-value/ov-cell.cc Sat Jan 25 01:02:12 2014 -0500 @@ -780,7 +780,7 @@ bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); if (! b) - return os; + return ! os.fail (); } } else @@ -802,7 +802,7 @@ bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); if (! b) - return os; + return ! os.fail (); } os << "\n";