optimize LLMuteList::isMuted; Don't check any lists if the users mute list is emoty anyway. Only pay the price if someone is muted.

meow-7.2.2
Nicky 2013-04-24 00:04:23 +02:00
parent 3520d90101
commit 00634cdd70
1 changed files with 5 additions and 0 deletions

View File

@ -622,6 +622,11 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const
{
// <FS:ND> In case of an empty mutelist, we can exit right away.
if( 0 == mMutes.size() )
return FALSE;
// </FS:ND>
// for objects, check for muting on their parent prim
LLViewerObject* mute_object = get_object_to_mute_from_id(id);
LLUUID id_to_check = (mute_object) ? mute_object->getID() : id;