1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Fix clang-tidy warnings

This commit is contained in:
Ivan Savenko
2025-06-18 17:38:05 +03:00
parent 298ec472bf
commit ae93cbde91
11 changed files with 23 additions and 19 deletions

View File

@ -31,6 +31,7 @@
QuickSpellPanel::QuickSpellPanel(BattleInterface & owner)
: CIntObject(0)
, owner(owner)
, isEnabled(true)
{
OBJECT_CONSTRUCTION;
@ -64,7 +65,7 @@ std::vector<std::tuple<SpellID, bool>> QuickSpellPanel::getSpells() const
}
// autofill empty slots with spells if possible
auto hero = owner.getBattle()->battleGetMyHero();
const auto * hero = owner.getBattle()->battleGetMyHero();
for(int i = 0; i < QUICKSPELL_SLOTS; i++)
{
if(spellIds[i] != SpellID::NONE)
@ -97,7 +98,7 @@ void QuickSpellPanel::create()
buttons.clear();
buttonsDisabled.clear();
auto hero = owner.getBattle()->battleGetMyHero();
const auto * hero = owner.getBattle()->battleGetMyHero();
if(!hero)
return;