mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Catch exceptions by const-ref, not by value
This commit is contained in:
parent
e814aca29f
commit
9822a8f2df
@ -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;
|
||||
|
@ -484,7 +484,7 @@ CGeneralTextHandler::CGeneralTextHandler()
|
||||
znpc00.push_back(parser.readString());
|
||||
} while (parser.endLine());
|
||||
}
|
||||
catch (std::runtime_error)
|
||||
catch (const std::runtime_error &)
|
||||
{
|
||||
logGlobal->warn("WoG file ZNPC00.TXT containing commander texts was not found");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user