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

More fixes for uninitialized fields

This commit is contained in:
Arseniy Shestakov 2016-08-18 18:53:28 +03:00
parent 89ce1a4509
commit ab06cfd586
4 changed files with 11 additions and 0 deletions

View File

@ -86,8 +86,10 @@ public:
value = 0;
aid = -1;
resID = -1;
objid = -1;
tile = int3(-1, -1, -1);
town = nullptr;
bid = -1;
}
virtual ~AbstractGoal(){};
//FIXME: abstract goal should be abstract, but serializer fails to instantiate subgoals in such case

View File

@ -467,6 +467,12 @@ ui8 CGHeroInstance::maxlevelsToWisdom() const
return type->heroClass->isMagicHero() ? 3 : 6;
}
CGHeroInstance::SecondarySkillsInfo::SecondarySkillsInfo()
{
magicSchoolCounter = 1;
wisdomCounter = 1;
}
void CGHeroInstance::SecondarySkillsInfo::resetMagicSchoolCounter()
{
magicSchoolCounter = 1;

View File

@ -119,6 +119,8 @@ public:
ui8 magicSchoolCounter;
ui8 wisdomCounter;
SecondarySkillsInfo();
void resetMagicSchoolCounter();
void resetWisdomCounter();

View File

@ -146,6 +146,7 @@ public:
si32 numOfGrants;
CVisitInfo():
selectChance(0),
numOfGrants(0)
{}