]> git.lyx.org Git - features.git/commitdiff
Fix duplicated pointer check
authorGeorg Baum <baum@lyx.org>
Sat, 10 Oct 2015 19:23:52 +0000 (21:23 +0200)
committerGeorg Baum <baum@lyx.org>
Sat, 10 Oct 2015 19:23:52 +0000 (21:23 +0200)
Found by cppcheck: (style) Same expression on both sides of '&&'.

src/lyxfind.cpp

index 2cd05ea4a75759a89c052c8c697d1099223d9479..c217281b66f526d2e00cbe678184bd146df3ecb6 100644 (file)
@@ -1072,7 +1072,7 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
                // Retrieve the math environment type, and add '$' or '$[' or others (\begin{equation}) accordingly
                for (int s = cur.depth() - 1; s >= 0; --s) {
                        CursorSlice const & cs = cur[s];
-                       if (cs.asInsetMath() && cs.asInsetMath() && cs.asInsetMath()->asHullInset()) {
+                       if (cs.asInsetMath() && cs.asInsetMath()->asHullInset()) {
                                WriteStream ws(ods);
                                cs.asInsetMath()->asHullInset()->header_write(ws);
                                break;