Mercurial > octave
changeset 23793:2641a0196176
don't use bitwise xor operator for logical xor operation
* Figure.cc (Figure::showFigureToolBar): Use proper logical tests for
logical xor operation instead of bitwise xor operator.
* ls-mat5.cc (read_mat5_binary_element): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 24 Jul 2017 14:08:37 -0400 |
parents | 0fb64e83f8b3 |
children | 7a1097510439 |
files | libgui/graphics/Figure.cc libinterp/corefcn/ls-mat5.cc |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc Mon Jul 24 13:51:56 2017 -0400 +++ b/libgui/graphics/Figure.cc Mon Jul 24 14:08:37 2017 -0400 @@ -565,7 +565,8 @@ if (! visible) visible = hasUiMenuChildren (properties<figure> ()); - if (m_menuBar->isVisible () ^ visible) + if ((m_menuBar->isVisible () && ! visible) + || (! m_menuBar->isVisible () && visible)) { int dy = qMax (h1, h2); QRect r = qWidget<QWidget> ()->geometry ();
--- a/libinterp/corefcn/ls-mat5.cc Mon Jul 24 13:51:56 2017 -0400 +++ b/libinterp/corefcn/ls-mat5.cc Mon Jul 24 14:08:37 2017 -0400 @@ -492,11 +492,13 @@ octave_idx_type nzmax; std::string classname; + bool flt_fmt_is_big_endian + = (octave::mach_info::native_float_format () + == octave::mach_info::flt_fmt_ieee_big_endian); + // MAT files always use IEEE floating point octave::mach_info::float_format flt_fmt = octave::mach_info::flt_fmt_unknown; - if ((octave::mach_info::native_float_format () - == octave::mach_info::flt_fmt_ieee_big_endian) - ^ swap) + if ((flt_fmt_is_big_endian && ! swap) || (! flt_fmt_is_big_endian && swap)) flt_fmt = octave::mach_info::flt_fmt_ieee_big_endian; else flt_fmt = octave::mach_info::flt_fmt_ieee_little_endian;