mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Misc: Fix static analysis issues reported by Coverity Scan
(cherry picked from commit de88691e25)
This commit is contained in:
@@ -183,6 +183,7 @@ void CharacterCache::UpdateCharacterArenaTeamId(ObjectGuid const& guid, uint8 sl
|
||||
if (itr == _characterCacheStore.end())
|
||||
return;
|
||||
|
||||
ASSERT(slot < 3);
|
||||
itr->second.ArenaTeamId[slot] = arenaTeamId;
|
||||
}
|
||||
|
||||
@@ -295,7 +296,9 @@ uint32 CharacterCache::GetCharacterArenaTeamIdByGuid(ObjectGuid guid, uint8 type
|
||||
if (itr == _characterCacheStore.end())
|
||||
return 0;
|
||||
|
||||
return itr->second.ArenaTeamId[ArenaTeam::GetSlotByType(type)];
|
||||
uint8 slot = ArenaTeam::GetSlotByType(type);
|
||||
ASSERT(slot < 3);
|
||||
return itr->second.ArenaTeamId[slot];
|
||||
}
|
||||
|
||||
bool CharacterCache::GetCharacterNameAndClassByGUID(ObjectGuid guid, std::string& name, uint8& _class) const
|
||||
|
||||
Reference in New Issue
Block a user