mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fixed a few CWE-457
This commit is contained in:
parent
c0ed22c99e
commit
609c6f81bd
@ -217,7 +217,9 @@ CMapHeader::~CMapHeader()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMap::CMap() : checksum(0), grailPos(-1, -1, -1), grailRadius(0), terrain(nullptr)
|
CMap::CMap()
|
||||||
|
: checksum(0), grailPos(-1, -1, -1), grailRadius(0), terrain(nullptr),
|
||||||
|
guardingCreaturePositions(nullptr)
|
||||||
{
|
{
|
||||||
allHeroes.resize(allowedHeroes.size());
|
allHeroes.resize(allowedHeroes.size());
|
||||||
allowedAbilities = VLC->heroh->getDefaultAllowedAbilities();
|
allowedAbilities = VLC->heroh->getDefaultAllowedAbilities();
|
||||||
|
@ -37,7 +37,9 @@ void CMapGenerator::foreachDirectNeighbour(const int3& pos, std::function<void(i
|
|||||||
|
|
||||||
|
|
||||||
CMapGenerator::CMapGenerator() :
|
CMapGenerator::CMapGenerator() :
|
||||||
zonesTotal(0), monolithIndex(0)
|
mapGenOptions(nullptr), randomSeed(0), editManager(nullptr),
|
||||||
|
zonesTotal(0), tiles(nullptr), prisonsRemaining(0),
|
||||||
|
monolithIndex(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,9 @@ CPlacedZone::CPlacedZone(const CRmgTemplateZone * zone)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CZonePlacer::CZonePlacer(CMapGenerator * Gen) : gen(Gen)
|
CZonePlacer::CZonePlacer(CMapGenerator * Gen)
|
||||||
|
: width(0), height(0), scaleX(0), scaleY(0), mapSize(0), gravityConstant(0), stiffnessConstant(0),
|
||||||
|
gen(Gen)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -95,10 +95,11 @@ CSpell::LevelInfo::~LevelInfo()
|
|||||||
///CSpell
|
///CSpell
|
||||||
CSpell::CSpell():
|
CSpell::CSpell():
|
||||||
id(SpellID::NONE), level(0),
|
id(SpellID::NONE), level(0),
|
||||||
|
power(0),
|
||||||
combatSpell(false), creatureAbility(false),
|
combatSpell(false), creatureAbility(false),
|
||||||
positiveness(ESpellPositiveness::NEUTRAL),
|
positiveness(ESpellPositiveness::NEUTRAL),
|
||||||
defaultProbability(0),
|
defaultProbability(0),
|
||||||
isRising(false), isDamage(false), isOffensive(false),
|
isRising(false), isDamage(false), isOffensive(false), isSpecial(true),
|
||||||
targetType(ETargetType::NO_TARGET),
|
targetType(ETargetType::NO_TARGET),
|
||||||
mechanics(),
|
mechanics(),
|
||||||
adventureMechanics()
|
adventureMechanics()
|
||||||
|
@ -6277,6 +6277,8 @@ CGameHandler::FinishingBattleHelper::FinishingBattleHelper(std::shared_ptr<const
|
|||||||
CGameHandler::FinishingBattleHelper::FinishingBattleHelper()
|
CGameHandler::FinishingBattleHelper::FinishingBattleHelper()
|
||||||
{
|
{
|
||||||
winnerHero = loserHero = nullptr;
|
winnerHero = loserHero = nullptr;
|
||||||
|
duel = false;
|
||||||
|
remainingBattleQueriesCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CRandomGenerator & CGameHandler::getRandomGenerator()
|
CRandomGenerator & CGameHandler::getRandomGenerator()
|
||||||
|
@ -83,7 +83,6 @@ public:
|
|||||||
enum EVisitDest {VISIT_DEST, DONT_VISIT_DEST};
|
enum EVisitDest {VISIT_DEST, DONT_VISIT_DEST};
|
||||||
enum ELEaveTile {LEAVING_TILE, REMAINING_ON_TILE};
|
enum ELEaveTile {LEAVING_TILE, REMAINING_ON_TILE};
|
||||||
|
|
||||||
CVCMIServer *s;
|
|
||||||
std::map<PlayerColor, CConnection*> connections; //player color -> connection to client with interface of that player
|
std::map<PlayerColor, CConnection*> connections; //player color -> connection to client with interface of that player
|
||||||
PlayerStatuses states; //player color -> player state
|
PlayerStatuses states; //player color -> player state
|
||||||
std::set<CConnection*> conns;
|
std::set<CConnection*> conns;
|
||||||
|
@ -239,8 +239,9 @@ CBattleQuery::CBattleQuery(const BattleInfo *Bi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CBattleQuery::CBattleQuery()
|
CBattleQuery::CBattleQuery()
|
||||||
|
:bi(nullptr)
|
||||||
{
|
{
|
||||||
|
belligerents[0] = belligerents[1] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBattleQuery::blocksPack(const CPack *pack) const
|
bool CBattleQuery::blocksPack(const CPack *pack) const
|
||||||
|
Loading…
Reference in New Issue
Block a user