]> git.lyx.org Git - lyx.git/commitdiff
Fix Clang 14 warning -Wbitwise-instead-of-logical
authorScott Kostyshak <skostysh@lyx.org>
Fri, 29 Apr 2022 01:06:37 +0000 (21:06 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 29 Apr 2022 01:40:00 +0000 (21:40 -0400)
Use the boolean operator '||' with bools instead of the bitwise
operator '|'.

src/BufferView.cpp

index 32c890c7982030952cea75d41a4ce4a06a07e4e8..30944ccf9c764496788f6954b06137483331b2f1 100644 (file)
@@ -2531,7 +2531,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
 
        // Notify left insets
        if (cur != old) {
-               bool badcursor = old.fixIfBroken() | cur.fixIfBroken();
+               bool badcursor = old.fixIfBroken() || cur.fixIfBroken();
                badcursor |= notifyCursorLeavesOrEnters(old, cur);
                if (badcursor)
                        cursor().fixIfBroken();