From 00634cdd706f8ea70e36217906c811293cb4b9da Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 24 Apr 2013 00:04:23 +0200 Subject: [PATCH] optimize LLMuteList::isMuted; Don't check any lists if the users mute list is emoty anyway. Only pay the price if someone is muted. --- indra/newview/llmutelist.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 759af95804..0045df298e 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -622,6 +622,11 @@ BOOL LLMuteList::saveToFile(const std::string& filename) BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const { + // In case of an empty mutelist, we can exit right away. + if( 0 == mMutes.size() ) + return FALSE; + // + // 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;