1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

HeroBonus: remove unused function

This commit is contained in:
Konstantin 2023-04-30 16:14:30 +03:00
parent 34c1d4f3e9
commit 4894280c6b
2 changed files with 1 additions and 7 deletions

View File

@ -413,11 +413,6 @@ void BonusList::insert(BonusList::TInternalContainer::iterator position, BonusLi
changed();
}
int IBonusBearer::valOfBonuses(Bonus::BonusType type, const CSelector &selector) const
{
return valOfBonuses(Selector::type()(type).And(selector));
}
int IBonusBearer::valOfBonuses(Bonus::BonusType type, int subtype) const
{
//This part is performance-critical

View File

@ -607,8 +607,7 @@ public:
std::shared_ptr<const Bonus> getBonus(const CSelector &selector) const; //returns any bonus visible on node that matches (or nullptr if none matches)
//legacy interface
int valOfBonuses(Bonus::BonusType type, const CSelector &selector) const;
//Optimized interface (with auto-caching)
int valOfBonuses(Bonus::BonusType type, int subtype = -1) const; //subtype -> subtype of bonus, if -1 then anyt;
bool hasBonusOfType(Bonus::BonusType type, int subtype = -1) const;//determines if hero has a bonus of given type (and optionally subtype)
bool hasBonusFrom(Bonus::BonusSource source, ui32 sourceID) const;