From 243b5b6666f9ccdc024f90a7f4a933b8d1e87e8e Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 6 Mar 2024 23:52:16 +0000 Subject: [PATCH] Hopefully convince the old MSVC version on GitLab CI to work The old code was legal, and the things it did worked in other places, so should have worked here, too. Hopefully just rearranging stuff convinces what I assume to be a compiler bug to not happen. --- components/config/gamesettings.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/config/gamesettings.cpp b/components/config/gamesettings.cpp index 9aed4656bc..976d5e20f2 100644 --- a/components/config/gamesettings.cpp +++ b/components/config/gamesettings.cpp @@ -544,19 +544,15 @@ bool Config::GameSettings::hasMaster() void Config::GameSettings::setContentList( const QList& dirNames, const QList& archiveNames, const QStringList& fileNames) { - auto const reset = [this](const char* key, const QStringList& list) { - remove(key); - for (auto const& item : list) - setMultiValue(key, { item }); - }; - remove(sDirectoryKey); for (auto const& item : dirNames) setMultiValue(sDirectoryKey, item); remove(sArchiveKey); for (auto const& item : archiveNames) setMultiValue(sArchiveKey, item); - reset(sContentKey, fileNames); + remove(sContentKey); + for (auto const& item : fileNames) + setMultiValue(sContentKey, { item }); } QList Config::GameSettings::getDataDirs() const