From 50575bbcfbaeac78f20c80232af3c91d097e595c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 16 Oct 2020 20:05:32 +0200 Subject: [PATCH] Remove more avoidable per-frame getInstance calls --- indra/newview/llnetmap.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index f0eafeb38a..e50a8ae999 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1894,16 +1894,18 @@ LLColor4 LLNetMap::getAvatarColor(const LLUUID& avatar_id) { static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white); LLColor4 color = map_avatar_color; - + + LGGContactSets& cs_instance = LGGContactSets::instance(); + // Color "special" avatars with special colors (Friends, muted, Lindens, etc) - color = LGGContactSets::getInstance()->colorize(avatar_id, color, LGG_CS_MINIMAP); + color = cs_instance.colorize(avatar_id, color, LGG_CS_MINIMAP); // Color based on contact sets prefs - if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avatar_id, LGG_CS_MINIMAP)) + if (cs_instance.hasFriendColorThatShouldShow(avatar_id, LGG_CS_MINIMAP)) { - color = LGGContactSets::getInstance()->getFriendColor(avatar_id); + color = cs_instance.getFriendColor(avatar_id); } - + // Mark Avatars with special colors avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id); if (found != sAvatarMarksMap.end())