Mercurial > octave
changeset 26413:05ce565644bd stable
ov-bool.cc: Fix static analyzer detected issues (bug #55347).
* ov-bool.cc (load_ascii, load_hdf5): Use "0.0" instead of "0." for floating
point 0 for clarity.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 03 Jan 2019 15:00:01 -0800 |
parents | ccacd7162520 |
children | 8e39c5a22bc2 |
files | libinterp/octave-value/ov-bool.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-bool.cc Thu Jan 03 14:47:20 2019 -0800 +++ b/libinterp/octave-value/ov-bool.cc Thu Jan 03 15:00:01 2019 -0800 @@ -194,7 +194,7 @@ bool octave_bool::load_ascii (std::istream& is) { - scalar = (octave_read_value<double> (is) != 0.); + scalar = (octave_read_value<double> (is) != 0.0); if (! is) error ("load: failed to load scalar constant"); @@ -294,7 +294,7 @@ return false; } - scalar = (dtmp != 0.); + scalar = (dtmp != 0.0); H5Dclose (data_hid);