summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-07-03 20:06:47 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-07-03 20:06:47 +0300
commit779b5627c5e9c76a06938cd4e73a5b8f0440cabc (patch)
treeabafc7ab0b5ea0684f241bbae2a3b09b990fb6dc /indra/newview/llappviewer.cpp
parent2752e342f63fc74c49e19317885280fb279ae2fa (diff)
DRTVWR-493 LLAvatarNameCache to singletone
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 151039acce..823ded7a50 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4509,7 +4509,7 @@ void LLAppViewer::loadNameCache()
llifstream name_cache_stream(filename.c_str());
if(name_cache_stream.is_open())
{
- if ( ! LLAvatarNameCache::importFile(name_cache_stream))
+ if ( ! LLAvatarNameCache::getInstance()->importFile(name_cache_stream))
{
LL_WARNS("AppInit") << "removing invalid '" << filename << "'" << LL_ENDL;
name_cache_stream.close();
@@ -4536,7 +4536,7 @@ void LLAppViewer::saveNameCache()
llofstream name_cache_stream(filename.c_str());
if(name_cache_stream.is_open())
{
- LLAvatarNameCache::exportFile(name_cache_stream);
+ LLAvatarNameCache::getInstance()->exportFile(name_cache_stream);
}
// real names cache
@@ -5143,7 +5143,8 @@ void LLAppViewer::idleNameCache()
// granted to neighbor regions before the main agent gets there. Can't
// do it in the move-into-region code because cap not guaranteed to be
// granted yet, for example on teleport.
- bool had_capability = LLAvatarNameCache::hasNameLookupURL();
+ LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance();
+ bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL();
std::string name_lookup_url;
name_lookup_url.reserve(128); // avoid a memory allocation below
name_lookup_url = region->getCapability("GetDisplayNames");
@@ -5160,12 +5161,12 @@ void LLAppViewer::idleNameCache()
{
name_lookup_url += '/';
}
- LLAvatarNameCache::setNameLookupURL(name_lookup_url);
+ name_cache->setNameLookupURL(name_lookup_url);
}
else
{
// Display names not available on this region
- LLAvatarNameCache::setNameLookupURL( std::string() );
+ name_cache->setNameLookupURL( std::string() );
}
// Error recovery - did we change state?
@@ -5175,7 +5176,7 @@ void LLAppViewer::idleNameCache()
LLVOAvatar::invalidateNameTags();
}
- LLAvatarNameCache::idle();
+ name_cache->idle();
}
//