]> git.lyx.org Git - features.git/commitdiff
h_use_minted is a bool, not a string
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 6 Jul 2017 12:09:18 +0000 (14:09 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 6 Jul 2017 12:11:30 +0000 (14:11 +0200)
We have a mix in this file of boolean stored as such or as strings.
This translates to values written as true/false or 1/0 in .lyx files.

In this case, the value of use_minted could only be true, since the
char * pointer is non null.

Also add some else clauses.

Spotted by coverity.

src/tex2lyx/Preamble.cpp

index dc0ff8029f4a03fbf86eab2a2573be5fa3057091..b3f7b1efc8a3f1fba413b57d18b99df5cfbf321b 100644 (file)
@@ -992,9 +992,9 @@ void Preamble::handle_package(Parser &p, string const & name,
        else if (is_known(name, known_lyx_packages) && options.empty()) {
                if (name == "splitidx")
                        h_use_indices = "true";
-               if (name == "minted")
-                       h_use_minted = "true";
-               if (name == "refstyle")
+               else if (name == "minted")
+                       h_use_minted = true;
+               else if (name == "refstyle")
                        h_use_refstyle = true;
                else if (name == "prettyref")
                        h_use_refstyle = false;