Core/Misc: Fix issues reported by static analysis

Fix issues reported by Coverity Scan

(cherry picked from commit 2fda1572d2)
This commit is contained in:
jackpoz
2019-02-05 21:10:39 +01:00
committed by Shauren
parent 9807f32334
commit 3ddbf02dc7
5 changed files with 5 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ struct PositionFullTerrainStatus
uint32 const mogpFlags;
};
PositionFullTerrainStatus() : areaId(0), floorZ(0.0f), outdoors(true) { }
PositionFullTerrainStatus() : areaId(0), floorZ(0.0f), outdoors(true), liquidStatus(LIQUID_MAP_NO_WATER) { }
uint32 areaId;
float floorZ;
bool outdoors;

View File

@@ -90,7 +90,7 @@ protected:
public:
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) { }
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false), initialOrientation(0.f) { }
/** Caclulates the position for given segment Idx, and percent of segment length t
@param t - percent of segment length, assumes that t in range [0, 1]

View File

@@ -533,7 +533,7 @@ public:
return true;
}
handler->PSendSysMessage(LANG_COMMAND_GO_INSTANCE_FAILED, mapid, scriptname.c_str(), exit->target_mapId);
handler->PSendSysMessage(LANG_COMMAND_GO_INSTANCE_FAILED, mapid, scriptname.c_str(), exit ? exit->target_mapId : uint32(-1));
handler->SetSentErrorMessage(true);
return false;
}

View File

@@ -1159,7 +1159,7 @@ class spell_algalon_big_bang : public SpellScript
AfterCast += SpellCastFn(spell_algalon_big_bang::CheckTargets);
}
private:
uint32 _targetCount;
uint32 _targetCount = 0;
};
// 64445 - Remove Player from Phase

View File

@@ -955,7 +955,7 @@ class spell_xt002_exposed_heart : public AuraScript
}
private:
uint32 _damageAmount;
uint32 _damageAmount = 0;
};
class achievement_nerf_engineering : public AchievementCriteriaScript