]> git.lyx.org Git - features.git/commitdiff
Simplify
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 15 Apr 2018 10:37:41 +0000 (12:37 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 15 Apr 2018 10:37:41 +0000 (12:37 +0200)
src/Paragraph.cpp

index 9dfd0938f437e26c84c692aea22e93981a6577ca..4df4481ee4d7b34c045290bdbd260991fe0bda9b 100644 (file)
@@ -3401,9 +3401,8 @@ bool Paragraph::needsCProtection() const
        // now check whether we have insets that need cprotection
        pos_type size = d->text_.size();
        for (pos_type i = 0; i < size; ++i)
-               if (isInset(i))
-                       if (getInset(i)->needsCProtection())
-                               return true;
+               if (isInset(i) && getInset(i)->needsCProtection())
+                       return true;
 
        return false;
 }