Core/Misc: Fix static analysis issues

This commit is contained in:
jackpoz
2017-11-11 18:05:05 +01:00
parent f017b1d470
commit 7e73f5f1ed
5 changed files with 5 additions and 5 deletions

View File

@@ -490,7 +490,7 @@ void parseFilename(
}
} else if ((f.size() >= 2) & isSlash(f[0]) && isSlash(f[1])) {
} else if ((f.size() >= 2) && isSlash(f[0]) && isSlash(f[1])) {
// e.g. //foo
root = f.substr(0, 2);

View File

@@ -176,7 +176,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (team == TEAM_ALLIANCE)
UpdateWorldState(BG_AB_OP_RESOURCES_ALLY, m_TeamScores[team]);
else if (team == TEAM_HORDE)
else
UpdateWorldState(BG_AB_OP_RESOURCES_HORDE, m_TeamScores[team]);
// update achievement flags
// we increased m_TeamScores[team] so we just need to check if it is 500 more than other teams resources

View File

@@ -60,7 +60,7 @@ typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventCon
struct GameEventData
{
GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL),
GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), holidayStage(0), state(GAMEEVENT_NORMAL),
announce(0) { }
time_t start; // occurs after this time
time_t end; // occurs before this time

View File

@@ -411,7 +411,7 @@ public:
tree->AI()->Talk(SAY_WALKER_FRIENDLY, player);
tree->DespawnOrUnsummon(1000);
}
else if (roll == 0) // enemy version
else // enemy version
{
tree->AI()->Talk(SAY_WALKER_ENEMY, player);
tree->SetFaction(FACTION_MONSTER);

View File

@@ -148,7 +148,7 @@ class instance_serpent_shrine : public InstanceMapScript
player->CastSpell(player, SPELL_SCALDINGWATER, true);
}
else if (Water == WATERSTATE_FRENZY)
else
{
//spawn frenzy
if (DoSpawnFrenzy)