Le 21/09/2025 à 00:26, Jean-Marc Lasgouttes a écrit :
commit 1242365de7b7f61dd4aaacce66ab40a3cda144bf
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Sat Sep 20 21:56:17 2025 +0200
readTheme() : pass rc parameter by address.
This issue has been pointed out by Coverity Scan as a performance issue.
However, it turns out that it is necessary to pass rc by address so
that it can be modified.
Koji, please check that I got it right.
JMarc
---
src/frontends/qt/GuiPrefs.cpp | 2 +-
src/frontends/qt/GuiPrefs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index f055a65078..eb961e290b 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1614,7 +1614,7 @@ void PrefColors::cacheAllThemes()
}
-ColorNamePairs PrefColors::readTheme(FileName fullpath, LyXRC rc) const
+ColorNamePairs PrefColors::readTheme(FileName const & fullpath, LyXRC & rc)
const
{
ColorNamePairs colors;
colors.resize(lcolors_.size());
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index 4dc44d64ec..ab67f69ebc 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -351,7 +351,7 @@ private:
///
void cacheAllThemes();
///
- ColorNamePairs readTheme(support::FileName fullpath, LyXRC rc) const;
+ ColorNamePairs readTheme(support::FileName const & fullpath, LyXRC &
rc) const;
/// Common algorithm between saving and exporting
void saveExportThemeCommon(QString file_path);
/// Common algorithm between loading and importing.
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel