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:
parent
bbf08afb3d
commit
802147c5b7
@ -133,6 +133,7 @@ Goals::TGoalVec CaptureObjectsBehavior::getVisitGoals(const std::vector<AIPath>
|
||||
}
|
||||
}
|
||||
|
||||
assert(closestWay || waysToVisitObj.empty());
|
||||
for(auto way : waysToVisitObj)
|
||||
{
|
||||
way->closestWayRatio
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user