1
0
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:
Alexander Shishkin
2018-10-30 05:08:30 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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");
}