diff options
author | James Cook <james@lindenlab.com> | 2010-04-20 17:05:49 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-04-20 17:05:49 -0700 |
commit | 022a598694cd37bebff3322054324c7d27afd5ff (patch) | |
tree | 81fbb61a86ee00c8b3287eaedd7da2af39da188f /indra/newview/llappviewer.cpp | |
parent | 257c3ed2a3747256500f704f6e06e7631af3c08e (diff) |
Viewer caches avatar display names between sessions
Reviewed with Simon
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 409146c4a3..ac9672858d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3333,6 +3333,15 @@ void LLAppViewer::saveFinalSnapshot() void LLAppViewer::loadNameCache() { + // display names cache + std::string filename = + gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); + llifstream name_cache_stream(filename); + if(name_cache_stream.is_open()) + { + LLAvatarNameCache::importFile(name_cache_stream); + } + if (!gCacheName) return; std::string name_cache; @@ -3346,6 +3355,15 @@ void LLAppViewer::loadNameCache() void LLAppViewer::saveNameCache() { + // display names cache + std::string filename = + gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); + llofstream name_cache_stream(filename); + if(name_cache_stream.is_open()) + { + LLAvatarNameCache::exportFile(name_cache_stream); + } + if (!gCacheName) return; std::string name_cache; |