chore(Core/Player): Small optimization in the IsInWhisperWhiteList() … (#13026)

...function.
This commit is contained in:
Skjalf
2022-09-17 16:54:16 -03:00
committed by GitHub
parent a3ac2787bb
commit 9c4a9178f3

View File

@@ -15515,9 +15515,13 @@ void Player::_SaveInstanceTimeRestrictions(CharacterDatabaseTransaction trans)
bool Player::IsInWhisperWhiteList(ObjectGuid guid)
{
for (WhisperListContainer::const_iterator itr = WhisperList.begin(); itr != WhisperList.end(); ++itr)
if (*itr == guid)
for (auto const& itr : WhisperList)
{
if (itr == guid)
{
return true;
}
}
return false;
}