commit db97ead517e7279b969308f4919c37a900e4145a Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Thu Apr 24 15:18:30 2025 +0200
Try to avoid copying a potentially large temp variable Spotted by Coverity Scan. --- src/frontends/qt/GuiPrefs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index 5b22364e0e..c7f3e44596 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -1569,9 +1569,8 @@ void PrefColors::cacheAllThemes() { guiApp->setOverrideCursor(QCursor(Qt::WaitCursor)); for (int id = 0; id < themesLW->count(); ++id) { - ColorNamePairs colorset; - colorset = loadImportThemeCommon(FileName(fromqstr(theme_fullpaths_[id]))); - themes_cache_.push_back(colorset); + FileName const fn(fromqstr(theme_fullpaths_[id])); + themes_cache_.push_back(loadImportThemeCommon(fn)); theme_names_cache_.push_back(themesLW->item(id)->text()); } guiApp->restoreOverrideCursor(); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs