]> git.lyx.org Git - features.git/commitdiff
avoid compiler warning regarding operator precedence
authorStephan Witt <switt@lyx.org>
Fri, 7 Oct 2011 07:59:50 +0000 (07:59 +0000)
committerStephan Witt <switt@lyx.org>
Fri, 7 Oct 2011 07:59:50 +0000 (07:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39815 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/frontends/qt4/GuiSpellchecker.cpp

index f2f0b432ac91429dabf12f24da1aa2cdfceaea04..a6fe5aa93286b265e9d9ea998de0120114e5faee 100644 (file)
@@ -4194,7 +4194,7 @@ int Buffer::spellCheck(DocIterator & from, DocIterator & to,
                }
                // If from is at the end of the document (which is possible
                // when leaving the mathed) LyX will crash later otherwise.
-               if (from.atEnd() || !to_end && from >= end)
+               if (from.atEnd() || (!to_end && from >= end))
                        break;
                to = from;
                from.paragraph().spellCheck();
index ff705cb2f80dc6766af38f7659bb584bff9dd8be..f89dd750fc8a16a0b22a09faffb12033dff23ee9 100644 (file)
@@ -257,7 +257,7 @@ bool SpellcheckerWidget::Private::atLastPos(DocIterator cursor) const
        bool const valid_end = !end_.empty();
        return cursor.depth() <= 1 && (
                cursor.atEnd() ||
-               valid_end && cursor >= end_);
+               (valid_end && cursor >= end_));
 }
 
 bool SpellcheckerWidget::Private::isWrapAround(DocIterator cursor) const