Static'd and or const'd some instances of LLCachedControl.

Converted a few frequently fetched settings to LLCachedControl
This commit is contained in:
Shyotl
2011-02-24 17:27:57 -06:00
parent 6fb8f9bc96
commit 1e85c42bb7
12 changed files with 31 additions and 29 deletions

View File

@@ -430,7 +430,7 @@ BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
BOOL have_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
@@ -530,7 +530,7 @@ BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
BOOL have_name;
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
@@ -1045,7 +1045,7 @@ void LLPanelFriends::onClickRemove(void* user_data)
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
std::string fullname;
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;
@@ -1303,7 +1303,7 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
if (LLAvatarNameCache::get(agent_id, &avatar_name))
{
std::string fullname;
static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
switch (phoenix_name_system)
{
case 0 : fullname = avatar_name.getLegacyName(); break;