diff --git a/lib/bonuses/CBonusSystemNode.cpp b/lib/bonuses/CBonusSystemNode.cpp index 2fca57dff..7b944eefb 100644 --- a/lib/bonuses/CBonusSystemNode.cpp +++ b/lib/bonuses/CBonusSystemNode.cpp @@ -625,13 +625,6 @@ void CBonusSystemNode::limitBonuses(const BonusList &allBonuses, BonusList &out) } } -TBonusListPtr CBonusSystemNode::limitBonuses(const BonusList &allBonuses) const -{ - auto ret = std::make_shared(); - limitBonuses(allBonuses, *ret); - return ret; -} - void CBonusSystemNode::treeHasChanged() { treeChanged++; diff --git a/lib/bonuses/CBonusSystemNode.h b/lib/bonuses/CBonusSystemNode.h index e5b320af3..460957f8b 100644 --- a/lib/bonuses/CBonusSystemNode.h +++ b/lib/bonuses/CBonusSystemNode.h @@ -55,6 +55,7 @@ private: void getAllBonusesRec(BonusList &out, const CSelector & selector) const; TConstBonusListPtr getAllBonusesWithoutCaching(const CSelector &selector, const CSelector &limit) const; std::shared_ptr getUpdatedBonus(const std::shared_ptr & b, const TUpdaterPtr & updater) const; + void limitBonuses(const BonusList &allBonuses, BonusList &out) const; //out will bo populed with bonuses that are not limited here void getRedParents(TCNodes &out) const; //retrieves list of red parent nodes (nodes bonuses propagate from) void getRedAncestors(TCNodes &out) const; @@ -84,8 +85,6 @@ public: explicit CBonusSystemNode(ENodeTypes NodeType); virtual ~CBonusSystemNode(); - void limitBonuses(const BonusList &allBonuses, BonusList &out) const; //out will bo populed with bonuses that are not limited here - TBonusListPtr limitBonuses(const BonusList &allBonuses) const; //same as above, returns out by val for convenience TConstBonusListPtr getAllBonuses(const CSelector &selector, const CSelector &limit, const std::string &cachingStr = "") const override; void getParents(TCNodes &out) const; //retrieves list of parent nodes (nodes to inherit bonuses from), diff --git a/lib/bonuses/IBonusBearer.h b/lib/bonuses/IBonusBearer.h index b37dbfddb..b272edea4 100644 --- a/lib/bonuses/IBonusBearer.h +++ b/lib/bonuses/IBonusBearer.h @@ -17,9 +17,7 @@ class DLL_LINKAGE IBonusBearer { public: //new bonusing node interface - // * selector is predicate that tests if HeroBonus matches our criteria - // * root is node on which call was made (nullptr will be replaced with this) - //interface + // * selector is predicate that tests if Bonus matches our criteria IBonusBearer() = default; virtual ~IBonusBearer() = default; virtual TConstBonusListPtr getAllBonuses(const CSelector &selector, const CSelector &limit, const std::string &cachingStr = "") const = 0;