1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

add some asserts that shouldn't fire

This commit is contained in:
Andrey Filipenkov 2022-09-24 17:30:00 +03:00
parent bbf08afb3d
commit 802147c5b7
3 changed files with 3 additions and 0 deletions

View File

@ -133,6 +133,7 @@ Goals::TGoalVec CaptureObjectsBehavior::getVisitGoals(const std::vector<AIPath>
}
}
assert(closestWay || waysToVisitObj.empty());
for(auto way : waysToVisitObj)
{
way->closestWayRatio

View File

@ -208,6 +208,7 @@ void CMessage::drawIWindow(CInfoWindow * ret, std::string text, PlayerColor play
const int sizes[][2] = {{400, 125}, {500, 150}, {600, 200}, {480, 400}};
assert(ret && ret->text);
for(int i = 0;
i < ARRAY_COUNT(sizes)
&& sizes[i][0] < screen->w - 150

View File

@ -490,6 +490,7 @@ bool BaseMechanics::adaptGenericProblem(Problem & target) const
MetaString text;
// %s recites the incantations but they seem to have no effect.
text.addTxt(MetaString::GENERAL_TXT, 541);
assert(caster);
caster->getCasterName(text);
target.add(std::move(text), spells::Problem::NORMAL);