From 3e23a55c6644f6bc7d78f8731f1cc54fdd7cb0a3 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 19 Apr 2024 12:46:50 +0300 Subject: [PATCH] Fix build --- client/globalLobby/GlobalLobbyRoomWindow.h | 3 +++ lib/modding/ModVerificationInfo.cpp | 6 ++++++ mapeditor/mainwindow.cpp | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/globalLobby/GlobalLobbyRoomWindow.h b/client/globalLobby/GlobalLobbyRoomWindow.h index a98b92e1a..9feb895da 100644 --- a/client/globalLobby/GlobalLobbyRoomWindow.h +++ b/client/globalLobby/GlobalLobbyRoomWindow.h @@ -23,7 +23,10 @@ class CListBox; struct GlobalLobbyAccount; struct GlobalLobbyRoom; + +VCMI_LIB_NAMESPACE_BEGIN struct ModVerificationInfo; +VCMI_LIB_NAMESPACE_END struct GlobalLobbyRoomModInfo { diff --git a/lib/modding/ModVerificationInfo.cpp b/lib/modding/ModVerificationInfo.cpp index ba1117c46..12b48aa84 100644 --- a/lib/modding/ModVerificationInfo.cpp +++ b/lib/modding/ModVerificationInfo.cpp @@ -17,6 +17,8 @@ #include "../json/JsonNode.h" #include "../VCMI_Lib.h" +VCMI_LIB_NAMESPACE_BEGIN + JsonNode ModVerificationInfo::jsonSerializeList(const ModCompatibilityInfo & input) { JsonNode output; @@ -90,6 +92,8 @@ ModListVerificationStatus ModVerificationInfo::verifyListAgainstLocalMods(const modAffectsGameplay |= VLC->modh->getModInfo(remoteModId).checkModGameplayAffecting(); assert(modAffectsGameplay); // such mods should not be in the list to begin with + if (!modAffectsGameplay) + continue; // skip it if (!vstd::contains(VLC->modh->getActiveMods(), remoteModId)) { @@ -108,3 +112,5 @@ ModListVerificationStatus ModVerificationInfo::verifyListAgainstLocalMods(const return result; } + +VCMI_LIB_NAMESPACE_END diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index b50353c0d..1f1dd849a 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -340,9 +340,9 @@ std::unique_ptr MainWindow::openMapInternal(const QString & filenameSelect if(auto header = mapService.loadMapHeader(resId)) { auto missingMods = CMapService::verifyMapHeaderMods(*header); - ModIncompatibility::ModListWithVersion modList; + ModIncompatibility::ModList modList; for(const auto & m : missingMods) - modList.push_back({m.second.name, m.second.version.toString()}); + modList.push_back(m.second.name); if(!modList.empty()) throw ModIncompatibility(modList);