[LyX/master] Const-ness, and a missing Class declaration. I do not understand why this ever worked.

Richard Kimberly Heck rikiheck at lyx.org
Mon May 18 00:31:44 UTC 2020


commit e1615f4107be02cf73a36c1ee033239eb487fff5
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sun May 17 20:52:58 2020 -0400

    Const-ness, and a missing Class declaration. I do not understand
    why this ever worked.
---
 src/LyXRC.cpp           |    5 +++--
 src/frontends/Painter.h |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index a274c5f..42df207 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -643,13 +643,13 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
 				lexrc.printError("Missing color tag.");
 				break;
 			}
-			string lyx_name = lexrc.getString();
+			string const lyx_name = lexrc.getString();
 
 			if (!lexrc.next()) {
 				lexrc.printError("Missing color name for color: `$$Token'");
 				break;
 			}
-			string x11_name = lexrc.getString();
+			string const x11_name = lexrc.getString();
 
 			ColorCode const col =
 				lcolor.getFromLyXName(lyx_name);
@@ -660,6 +660,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
 
 			if (!lcolor.setColor(col, x11_name))
 				LYXERR0("Bad lyxrc set_color for " << lyx_name);
+			LYXERR(Debug::LYXRC, "Set " << lyx_name << "(" << col << ") to " << x11_name);
 			break;
 		}
 
diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h
index 1ab4347..fc6cc41 100644
--- a/src/frontends/Painter.h
+++ b/src/frontends/Painter.h
@@ -18,6 +18,7 @@
 
 namespace lyx {
 
+class Color;
 class Font;
 class FontInfo;
 


More information about the lyx-cvs mailing list