From 5c6abb30c68135e9dc9c8f1e373941e5a198e1ce Mon Sep 17 00:00:00 2001 From: MichalZr6 Date: Thu, 1 Aug 2024 14:34:58 +0200 Subject: [PATCH] Fix typo --- client/windows/GUIClasses.cpp | 8 ++++---- client/windows/GUIClasses.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index a7652847f..f2361e759 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -1200,7 +1200,7 @@ void CHillFortWindow::updateGarrisons() newState = State::ALREADY_UPGRADED; if(!totalSum.canBeAfforded(myRes)) - newState = State::UNAFORDABLE; + newState = State::UNAFFORDABLE; } currState[slotsCount] = newState; @@ -1217,7 +1217,7 @@ void CHillFortWindow::updateGarrisons() slotLabels[i][j]->setText(""); } //if can upgrade or can not afford, draw cost - if(currState[i] == State::UNAFORDABLE || currState[i] == State::MAKE_UPGRADE) + if(currState[i] == State::UNAFFORDABLE || currState[i] == State::MAKE_UPGRADE) { if(costs[i].nonZero()) { @@ -1269,7 +1269,7 @@ void CHillFortWindow::makeDeal(SlotID slot) case State::ALREADY_UPGRADED: LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[313 + offset], std::vector>(), soundBase::sound_todo); break; - case State::UNAFORDABLE: + case State::UNAFFORDABLE: LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[314 + offset], std::vector>(), soundBase::sound_todo); break; case State::UNAVAILABLE: @@ -1324,7 +1324,7 @@ CHillFortWindow::State CHillFortWindow::getState(SlotID slot) } if(!(info.cost[0] * hero->getStackCount(slot)).canBeAfforded(myRes)) - return State::UNAFORDABLE; + return State::UNAFFORDABLE; return State::MAKE_UPGRADE; } diff --git a/client/windows/GUIClasses.h b/client/windows/GUIClasses.h index a652cf551..70359bc7f 100644 --- a/client/windows/GUIClasses.h +++ b/client/windows/GUIClasses.h @@ -445,7 +445,7 @@ class CHillFortWindow : public CStatusbarWindow, public IGarrisonHolder { private: - enum class State { UNAFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE }; + enum class State { UNAFFORDABLE, ALREADY_UPGRADED, MAKE_UPGRADE, EMPTY, UNAVAILABLE }; static constexpr std::size_t slotsCount = 7; //todo: mithril support static constexpr std::size_t resCount = 7;