From 8a1062b9cde714c373bfcc132bc1b3eeaa86230a Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Fri, 24 Oct 2025 01:15:43 +0200 Subject: [PATCH] fix --- client/lobby/BattleOnlyMode.cpp | 4 ++-- client/lobby/BattleOnlyMode.h | 12 ++++++++---- client/lobby/SelectionTab.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/client/lobby/BattleOnlyMode.cpp b/client/lobby/BattleOnlyMode.cpp index 09bbaa659..2ece2a03f 100644 --- a/client/lobby/BattleOnlyMode.cpp +++ b/client/lobby/BattleOnlyMode.cpp @@ -262,7 +262,7 @@ void BattleOnlyModeHeroSelector::setHeroIcon() setHeroIcon(); parent.setOkButtonEnabled(); }, selectedIndex, images, true, true); - window->onPopup = [this, heroes](int index) { + window->onPopup = [heroes](int index) { if(index == 0) return; index--; @@ -344,7 +344,7 @@ void BattleOnlyModeHeroSelector::setCreatureIcons() setCreatureIcons(); }); }, selectedIndex, images, true, true); - window->onPopup = [this, creatures](int index) { + window->onPopup = [creatures](int index) { if(index == 0) return; index--; diff --git a/client/lobby/BattleOnlyMode.h b/client/lobby/BattleOnlyMode.h index f4122b66b..c64daa422 100644 --- a/client/lobby/BattleOnlyMode.h +++ b/client/lobby/BattleOnlyMode.h @@ -12,14 +12,18 @@ #include "../windows/CWindowObject.h" #include "../../lib/constants/EntityIdentifiers.h" + +VCMI_LIB_NAMESPACE_BEGIN +class CGHeroInstance; +class CCreatureSet; +class CMap; +class EditorCallback; +VCMI_LIB_NAMESPACE_END + class FilledTexturePlayerColored; class CButton; class CPicture; class CLabel; -class CGHeroInstance; -class CCreatureSet; -class EditorCallback; -class CMap; class BattleOnlyModeWindow; class CAnimImage; class GraphicalPrimitiveCanvas; diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index 9fd8213fb..bf49be74f 100644 --- a/client/lobby/SelectionTab.cpp +++ b/client/lobby/SelectionTab.cpp @@ -246,7 +246,7 @@ SelectionTab::SelectionTab(ESelectionScreen Type) if(tabType == ESelectionScreen::newGame && !isMultiplayer) { - buttonBattleOnlyMode = std::make_shared(Point(23, 18), AnimationPath::builtin("lobby/battleButton"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode")), [this, tabTitle, tabTitleDelete](){ + buttonBattleOnlyMode = std::make_shared(Point(23, 18), AnimationPath::builtin("lobby/battleButton"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.battleOnlyMode")), [tabTitle, tabTitleDelete](){ BattleOnlyMode::openBattleWindow(); }); }