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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}