mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Use BattleHex as const ref wherever possible
Minor Fixes Drop unused function from BattleHexArray
This commit is contained in:
@@ -508,7 +508,7 @@ bool BattleSpellMechanics::counteringSelector(const Bonus * bonus) const
|
||||
return false;
|
||||
}
|
||||
|
||||
BattleHexArray BattleSpellMechanics::spellRangeInHexes(BattleHex centralHex) const
|
||||
BattleHexArray BattleSpellMechanics::spellRangeInHexes(const BattleHex & centralHex) const
|
||||
{
|
||||
using namespace SRSLPraserHelpers;
|
||||
|
||||
@@ -612,7 +612,7 @@ std::vector<Destination> BattleSpellMechanics::getPossibleDestinations(size_t in
|
||||
hexesToCheck.insert(stack->getPosition().getNeighbouringTiles());
|
||||
}
|
||||
|
||||
for(auto hex : hexesToCheck)
|
||||
for(const auto & hex : hexesToCheck)
|
||||
{
|
||||
if(hex.isAvailable())
|
||||
{
|
||||
@@ -659,7 +659,7 @@ bool BattleSpellMechanics::isReceptive(const battle::Unit * target) const
|
||||
return targetCondition->isReceptive(this, target);
|
||||
}
|
||||
|
||||
BattleHexArray BattleSpellMechanics::rangeInHexes(BattleHex centralHex) const
|
||||
BattleHexArray BattleSpellMechanics::rangeInHexes(const BattleHex & centralHex) const
|
||||
{
|
||||
if(isMassive() || !centralHex.isValid())
|
||||
return BattleHexArray();
|
||||
|
||||
Reference in New Issue
Block a user