1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-16 07:10:08 +00:00

Merge branch '2019noscope' into 'master'

Avoid an apparent compiler error in MSVC 2019

See merge request OpenMW/openmw!4451
This commit is contained in:
psi29a 2024-11-11 21:09:21 +00:00
commit 2c51bde18b

View File

@ -285,12 +285,12 @@ void Config::LauncherSettings::setContentList(const GameSettings& gameSettings)
for (const QString& listName : getContentLists()) for (const QString& listName : getContentLists())
{ {
const auto& listDirs = getDataDirectoryList(listName); const auto& listDirs = getDataDirectoryList(listName);
#ifdef Q_OS_WINDOWS
constexpr auto caseSensitivity = Qt::CaseInsensitive;
#else
constexpr auto caseSensitivity = Qt::CaseSensitive;
#endif
constexpr auto compareDataDirectories = [](const SettingValue& dir, const QString& listDir) { constexpr auto compareDataDirectories = [](const SettingValue& dir, const QString& listDir) {
#ifdef Q_OS_WINDOWS
constexpr auto caseSensitivity = Qt::CaseInsensitive;
#else
constexpr auto caseSensitivity = Qt::CaseSensitive;
#endif
return dir.originalRepresentation == listDir return dir.originalRepresentation == listDir
|| QDir::cleanPath(dir.originalRepresentation).compare(QDir::cleanPath(listDir), caseSensitivity) == 0; || QDir::cleanPath(dir.originalRepresentation).compare(QDir::cleanPath(listDir), caseSensitivity) == 0;
}; };