mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +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);
|
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)
|
if(e.goal->goalType == Goals::EGoals::VISIT_TILE || e.goal->goalType == Goals::EGoals::VISIT_OBJ)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -484,7 +484,7 @@ CGeneralTextHandler::CGeneralTextHandler()
|
|||||||
znpc00.push_back(parser.readString());
|
znpc00.push_back(parser.readString());
|
||||||
} while (parser.endLine());
|
} while (parser.endLine());
|
||||||
}
|
}
|
||||||
catch (std::runtime_error)
|
catch (const std::runtime_error &)
|
||||||
{
|
{
|
||||||
logGlobal->warn("WoG file ZNPC00.TXT containing commander texts was not found");
|
logGlobal->warn("WoG file ZNPC00.TXT containing commander texts was not found");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user