From 022a598694cd37bebff3322054324c7d27afd5ff Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 20 Apr 2010 17:05:49 -0700 Subject: Viewer caches avatar display names between sessions Reviewed with Simon --- indra/newview/llappviewer.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llappviewer.cpp') 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; -- cgit v1.2.3