chore(Core/Player): Small optimization in the IsInWhisperWhiteList() … (#13026)
...function.
This commit is contained in:
@@ -15515,9 +15515,13 @@ void Player::_SaveInstanceTimeRestrictions(CharacterDatabaseTransaction trans)
|
|||||||
|
|
||||||
bool Player::IsInWhisperWhiteList(ObjectGuid guid)
|
bool Player::IsInWhisperWhiteList(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
for (WhisperListContainer::const_iterator itr = WhisperList.begin(); itr != WhisperList.end(); ++itr)
|
for (auto const& itr : WhisperList)
|
||||||
if (*itr == guid)
|
{
|
||||||
|
if (itr == guid)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user