diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88a82358a1..c9630e3bd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,13 +117,13 @@ Coverity: Ubuntu_GCC: extends: .Ubuntu cache: - key: Ubuntu_GCC.v2 + key: Ubuntu_GCC.v3 before_script: - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic variables: CC: gcc CXX: g++ - CCACHE_SIZE: 3G + CCACHE_SIZE: 4G # When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks. timeout: 2h @@ -414,7 +414,7 @@ variables: &tests-targets after_script: - Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log cache: - key: ninja-v2 + key: ninja-v3 paths: - ccache - deps @@ -550,7 +550,7 @@ variables: &tests-targets after_script: - Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log cache: - key: msbuild-v2 + key: msbuild-v3 paths: - ccache - deps @@ -614,7 +614,7 @@ Windows_MSBuild_Engine_RelWithDebInfo: <<: *cs-targets config: "Debug" -.Windows_MSBuild_CS_RelWithDebInfo: +Windows_MSBuild_CS_RelWithDebInfo: extends: - .Windows_MSBuild_Base variables: diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index ba269ae0e0..87013df1ae 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -9,6 +9,7 @@ brew update --quiet [ -z "${TRAVIS}" ] && brew uninstall --ignore-dependencies qt@6 || true # Some of these tools can come from places other than brew, so check before installing +[ -z "${TRAVIS}" ] && brew reinstall xquartz [ -z "${TRAVIS}" ] && brew reinstall fontconfig command -v ccache >/dev/null 2>&1 || brew install ccache command -v cmake >/dev/null 2>&1 || brew install cmake @@ -21,6 +22,6 @@ ccache --version cmake --version qmake --version -curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20210716.zip -o ~/openmw-deps.zip +curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20220225.zip -o ~/openmw-deps.zip unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 17ff27f9f1..94c0f5fa46 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -608,12 +608,12 @@ if [ -z $SKIP_DOWNLOAD ]; then "LuaJIT-2.1.0-beta3-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" # Google test and mock - if [ ! -z $TEST_FRAMEWORK ]; then - echo "Google test 1.10.0..." + if [ -n "$TEST_FRAMEWORK" ]; then + echo "Google test 1.11.0..." if [ -d googletest ]; then printf " Google test exists, skipping." else - git clone -b release-1.10.0 https://github.com/google/googletest.git + git clone -b release-1.11.0 https://github.com/google/googletest.git fi fi @@ -1002,8 +1002,8 @@ printf "LuaJIT 2.1.0-beta3... " cd $DEPS echo # Google Test and Google Mock -if [ ! -z $TEST_FRAMEWORK ]; then - printf "Google test 1.10.0 ..." +if [ -n "$TEST_FRAMEWORK" ]; then + printf "Google test 1.11.0 ..." cd googletest mkdir -p build${MSVC_REAL_YEAR} diff --git a/CMakeLists.txt b/CMakeLists.txt index 5008d369dd..99eab68118 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(OpenMW) cmake_minimum_required(VERSION 3.1.0) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) include(GNUInstallDirs) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 29042a72a6..c096198462 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -139,14 +139,14 @@ Launcher::DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, Config: this, SLOT(updateNewProfileOkButton(QString))); connect(mCloneProfileDialog->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(updateCloneProfileOkButton(QString))); - connect(ui.directoryAddSubdirsButton, &QPushButton::released, this, [=]() { this->addSubdirectories(true); }); - connect(ui.directoryInsertButton, &QPushButton::released, this, [=]() { this->addSubdirectories(false); }); - connect(ui.directoryUpButton, &QPushButton::released, this, [=]() { this->moveDirectory(-1); }); - connect(ui.directoryDownButton, &QPushButton::released, this, [=]() { this->moveDirectory(1); }); - connect(ui.directoryRemoveButton, &QPushButton::released, this, [=]() { this->removeDirectory(); }); - connect(ui.archiveUpButton, &QPushButton::released, this, [=]() { this->moveArchive(-1); }); - connect(ui.archiveDownButton, &QPushButton::released, this, [=]() { this->moveArchive(1); }); - connect(ui.directoryListWidget->model(), &QAbstractItemModel::rowsMoved, this, [=]() { this->sortDirectories(); }); + connect(ui.directoryAddSubdirsButton, &QPushButton::released, this, [this]() { this->addSubdirectories(true); }); + connect(ui.directoryInsertButton, &QPushButton::released, this, [this]() { this->addSubdirectories(false); }); + connect(ui.directoryUpButton, &QPushButton::released, this, [this]() { this->moveDirectory(-1); }); + connect(ui.directoryDownButton, &QPushButton::released, this, [this]() { this->moveDirectory(1); }); + connect(ui.directoryRemoveButton, &QPushButton::released, this, [this]() { this->removeDirectory(); }); + connect(ui.archiveUpButton, &QPushButton::released, this, [this]() { this->moveArchive(-1); }); + connect(ui.archiveDownButton, &QPushButton::released, this, [this]() { this->moveArchive(1); }); + connect(ui.directoryListWidget->model(), &QAbstractItemModel::rowsMoved, this, [this]() { this->sortDirectories(); }); buildView(); loadSettings(); diff --git a/apps/openmw/mwlua/stats.cpp b/apps/openmw/mwlua/stats.cpp index f81293513d..d1983c6077 100644 --- a/apps/openmw/mwlua/stats.cpp +++ b/apps/openmw/mwlua/stats.cpp @@ -155,7 +155,7 @@ namespace MWLua template sol::object get(const Context& context, std::string_view prop, G getter) const { - return getValue(context, mObject, &DynamicStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) + return getValue(context, mObject, &DynamicStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj) { const auto& ptr = obj->ptr(); return (ptr.getClass().getCreatureStats(ptr).getDynamic(mIndex).*getter)(); @@ -202,7 +202,7 @@ namespace MWLua template sol::object get(const Context& context, std::string_view prop, G getter) const { - return getValue(context, mObject, &AttributeStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) + return getValue(context, mObject, &AttributeStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj) { const auto& ptr = obj->ptr(); return (ptr.getClass().getCreatureStats(ptr).getAttribute(mIndex).*getter)(); @@ -266,7 +266,7 @@ namespace MWLua template sol::object get(const Context& context, std::string_view prop, G getter) const { - return getValue(context, mObject, &SkillStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) + return getValue(context, mObject, &SkillStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj) { const auto& ptr = obj->ptr(); return (ptr.getClass().getNpcStats(ptr).getSkill(mIndex).*getter)(); @@ -275,7 +275,7 @@ namespace MWLua sol::object getProgress(const Context& context) const { - return getValue(context, mObject, &SkillStat::setValue, mIndex, "progress", [=](const MWLua::Object* obj) + return getValue(context, mObject, &SkillStat::setValue, mIndex, "progress", [this](const MWLua::Object* obj) { const auto& ptr = obj->ptr(); return getProgress(ptr, mIndex, ptr.getClass().getNpcStats(ptr).getSkill(mIndex)); diff --git a/components/fx/technique.cpp b/components/fx/technique.cpp index 69999f1aa9..eaa74e3e3b 100644 --- a/components/fx/technique.cpp +++ b/components/fx/technique.cpp @@ -731,7 +731,7 @@ namespace fx for (auto t = mLexer->next(); !std::holds_alternative(t); t = mLexer->next()) { - std::visit([=](auto&& arg) { + std::visit([this](auto&& arg) { using T = std::decay_t; if constexpr (std::is_same_v)