2
0
Эх сурвалжийг харах

HeroBonus: remove unused function

Konstantin 2 жил өмнө
parent
commit
4894280c6b

+ 0 - 5
lib/bonuses/HeroBonus.cpp

@@ -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

+ 1 - 2
lib/bonuses/HeroBonus.h

@@ -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;