1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fixed a few CWE-457

This commit is contained in:
AlexVinS
2016-11-27 22:07:01 +03:00
parent abe4beebc6
commit 3216422307
23 changed files with 93 additions and 26 deletions

View File

@@ -26,6 +26,12 @@
const int NAMES_PER_TOWN=16; // number of town names per faction in H3 files. Json can define any number
CBuilding::CBuilding():
town(nullptr),mode(BUILD_NORMAL)
{
}
const std::string & CBuilding::Name() const
{
return name;
@@ -64,6 +70,8 @@ si32 CBuilding::getDistance(BuildingID buildID) const
CFaction::CFaction()
{
town = nullptr;
index = 0;
alignment = EAlignment::NEUTRAL;
}
CFaction::~CFaction()
@@ -72,6 +80,7 @@ CFaction::~CFaction()
}
CTown::CTown()
: faction(nullptr), mageLevel(0), primaryRes(0), moatDamage(0), defaultTavernChance(0)
{
}