mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Merge pull request #1241 from trofi/catch-by-reference
AI/Nullkiller/Goals/ExecuteHeroChain.cpp: catch polymorphic exception…
This commit is contained in:
@@ -127,7 +127,7 @@ void ExecuteHeroChain::accept(AIGateway * ai)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(cannotFulfillGoalException)
|
||||
catch(cannotFulfillGoalException &)
|
||||
{
|
||||
if(!heroPtr.validAndSet())
|
||||
{
|
||||
@@ -173,7 +173,7 @@ void ExecuteHeroChain::accept(AIGateway * ai)
|
||||
ai->nullkiller->lockHero(hero, HeroLockedReason::HERO_CHAIN);
|
||||
blockedIndexes.insert(node.parentIndex);
|
||||
}
|
||||
catch(goalFulfilledException)
|
||||
catch(goalFulfilledException &)
|
||||
{
|
||||
if(!heroPtr.validAndSet())
|
||||
{
|
||||
|
Reference in New Issue
Block a user