mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Pass functor via reference to avoid costly copies
This commit is contained in:
@@ -298,7 +298,7 @@ std::shared_ptr<StackWithBonuses> HypotheticBattle::getForUpdate(uint32_t id)
|
||||
}
|
||||
}
|
||||
|
||||
battle::Units HypotheticBattle::getUnitsIf(battle::UnitFilter predicate) const
|
||||
battle::Units HypotheticBattle::getUnitsIf(const battle::UnitFilter & predicate) const
|
||||
{
|
||||
battle::Units proxyed = BattleProxy::getUnitsIf(predicate);
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
int32_t getActiveStackID() const override;
|
||||
|
||||
battle::Units getUnitsIf(battle::UnitFilter predicate) const override;
|
||||
battle::Units getUnitsIf(const battle::UnitFilter & predicate) const override;
|
||||
|
||||
void nextRound() override;
|
||||
void nextTurn(uint32_t unitId) override;
|
||||
|
||||
Reference in New Issue
Block a user