[12169] Fix some problems detected by static code analysis

This commit is contained in:
zerg 2012-09-02 13:14:02 +06:00 committed by Antz
parent 62118e099e
commit b8b907c138
4 changed files with 6 additions and 5 deletions

View file

@ -1257,7 +1257,7 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket* data, BattleGround* bg)
if (type) // arena
{
// it seems this must be according to BG_WINNER_A/H and _NOT_ BG_TEAM_A/H
for (uint8 i = 1; i >= 0; --i)
for (int8 i = 1; i >= 0; --i)
{
uint32 pointsLost = bg->m_ArenaTeamRatingChanges[i] < 0 ? abs(bg->m_ArenaTeamRatingChanges[i]) : 0;
uint32 pointsGained = bg->m_ArenaTeamRatingChanges[i] > 0 ? bg->m_ArenaTeamRatingChanges[i] : 0;
@ -1267,7 +1267,8 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket* data, BattleGround* bg)
*data << uint32(0); // Matchmaking Value
DEBUG_LOG("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
}
for (uint8 i = 1; i >= 0; --i)
for (int8 i = 1; i >= 0; --i)
{
uint32 at_id = bg->m_ArenaTeamIds[i];
ArenaTeam* at = sObjectMgr.GetArenaTeamById(at_id);