Bitwise "&" has precedence over logical "&&", so I think this is alright.
https://en.cppreference.com/w/cpp/language/operator_precedence (Regardless I would always use parens in cases like this to make it easier for humans reading the code.) --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney <https://twitter.com/asmaloney> On Thu, Aug 27, 2020 at 5:17 PM John Weeks <j...@wavemetrics.com> wrote: > Isn't this a bug? > > bool QCocoaWindow::isTransitioningToFullScreen() const > { > NSWindow *window = m_view.window; > return window.styleMask & NSWindowStyleMaskFullScreen && > !window.qt_fullScreen; > } > > Seems like the bitwise & needs parens. > > This is from Qt 5.12.9. Haven't checked Qt 5.15. > > -John Weeks > WaveMetrics, Inc. > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest