mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge pull request #505 from janisozaur/catch-by-ref
Catch exceptions by const-ref, not by value
This commit is contained in:
@@ -1537,7 +1537,7 @@ void VCAI::wander(HeroPtr h)
|
||||
{
|
||||
decomposeGoal(bestObjectGoal)->accept(this);
|
||||
}
|
||||
catch(goalFulfilledException e)
|
||||
catch(const goalFulfilledException & e)
|
||||
{
|
||||
if(e.goal->goalType == Goals::EGoals::VISIT_TILE || e.goal->goalType == Goals::EGoals::VISIT_OBJ)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user