1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Use small vector for unit list

This commit is contained in:
Ivan Savenko
2025-01-10 18:58:46 +00:00
parent 797b62fd46
commit 40bff74195
26 changed files with 57 additions and 52 deletions

View File

@@ -22,6 +22,7 @@ class SpellSchool;
namespace battle
{
class Unit;
using Units = boost::container::small_vector<const Unit *, 4>;
}
namespace spells
@@ -65,7 +66,7 @@ public:
virtual void getCasterName(MetaString & text) const = 0;
///full default text
virtual void getCastDescription(const Spell * spell, const std::vector<const battle::Unit *> & attacked, MetaString & text) const = 0;
virtual void getCastDescription(const Spell * spell, const battle::Units & attacked, MetaString & text) const = 0;
virtual void spendMana(ServerCallback * server, const int32_t spellCost) const = 0;