commit ef972f32a10589a36f36cc7099893fb8d1fee125
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Nov 10 15:55:52 2025 +0100
Properly initialize booleans
---
src/TextClass.cpp | 8 --------
src/TextClass.h | 10 +++++-----
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/TextClass.cpp b/src/TextClass.cpp
index 0faa857c47..987c13f87a 100644
--- a/src/TextClass.cpp
+++ b/src/TextClass.cpp
@@ -1194,14 +1194,6 @@ void TextClass::readSpecialChars(Lexer & lexrc)
SpecialChar sc;
if (special_chars_.find(name) != special_chars_.end())
sc = special_chars_[name];
- else {
- // init values
- sc.can_break_after = false;
- sc.force_ltr = false;
- sc.is_char = false;
- sc.is_letter = false;
- sc.need_protect = false;
- }
while (!getout && lexrc.isOK()) {
int le = lexrc.lex();
switch (le) {
diff --git a/src/TextClass.h b/src/TextClass.h
index 4a431ee6d2..4731b131f4 100644
--- a/src/TextClass.h
+++ b/src/TextClass.h
@@ -56,11 +56,11 @@ public:
std::string menustring;
std::string req;
std::string type;
- bool can_break_after;
- bool is_letter;
- bool is_char;
- bool need_protect;
- bool force_ltr;
+ bool can_break_after = false;
+ bool is_letter = false;
+ bool is_char = false;
+ bool need_protect = false;
+ bool force_ltr = false;
FontInfo font;
};
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs