mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
Fix potentially uninitialized members
This commit is contained in:
parent
6d251de00d
commit
e32b6bd807
@ -17,10 +17,10 @@ namespace NKAI
|
||||
|
||||
struct ClusterObjectInfo
|
||||
{
|
||||
float priority;
|
||||
float movementCost;
|
||||
uint64_t danger;
|
||||
uint8_t turn;
|
||||
float priority = 0;
|
||||
float movementCost = 0;
|
||||
uint64_t danger = 0;
|
||||
uint8_t turn = 0;
|
||||
};
|
||||
|
||||
struct ObjectInstanceIDHash
|
||||
|
@ -64,7 +64,7 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
|
||||
BonusSubtypeID subtype;
|
||||
|
||||
BonusSource source = BonusSource::OTHER; //source type" uses BonusSource values - what gave that bonus
|
||||
BonusSource targetSourceType;//Bonuses of what origin this amplifies, uses BonusSource values. Needed for PERCENT_TO_TARGET_TYPE.
|
||||
BonusSource targetSourceType = BonusSource::OTHER;//Bonuses of what origin this amplifies, uses BonusSource values. Needed for PERCENT_TO_TARGET_TYPE.
|
||||
si32 val = 0;
|
||||
BonusSourceID sid; //source id: id of object/artifact/spell
|
||||
BonusValueType valType = BonusValueType::ADDITIVE_VALUE;
|
||||
|
@ -117,7 +117,7 @@ class DLL_LINKAGE HasAnotherBonusLimiter : public ILimiter //applies only to nod
|
||||
public:
|
||||
BonusType type;
|
||||
BonusSubtypeID subtype;
|
||||
BonusSource source;
|
||||
BonusSource source = BonusSource::OTHER;
|
||||
BonusSourceID sid;
|
||||
bool isSubtypeRelevant; //check for subtype only if this is true
|
||||
bool isSourceRelevant; //check for bonus source only if this is true
|
||||
|
Loading…
x
Reference in New Issue
Block a user