chore(Core/Player): Small optimization in the IsInWhisperWhiteList() … (#13026)
...function.
This commit is contained in:
parent
a3ac2787bb
commit
9c4a9178f3
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue