From: Stephan Witt Date: Fri, 7 Oct 2011 07:59:50 +0000 (+0000) Subject: avoid compiler warning regarding operator precedence X-Git-Tag: 2.1.0beta1~2613 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d29f1f6930099d3dab3af973d6329f4ad6505251;p=features.git avoid compiler warning regarding operator precedence git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39815 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index f2f0b432ac..a6fe5aa932 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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(); diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index ff705cb2f8..f89dd750fc 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -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