commit 64667735f41d0ecd0542985f56942bbaa8dce062
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Thu Jul 6 14:09:18 2017 +0200
h_use_minted is a bool, not a string
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 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index dc0ff80..b3f7b1e 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -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;