diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index 9c7688870d..3454da9451 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -43,8 +43,6 @@ static const char* subdirs = "0123456789abcdef"; LLDiskCache::LLDiskCache(const std::string cache_dir, - // Fix integer overflow - //const int max_size_bytes, const uintmax_t max_size_bytes, const bool enable_cache_debug_info) : mCacheDir(cache_dir), @@ -117,15 +115,12 @@ void LLDiskCache::purge() if (file_size_total > mMaxSizeBytes) { action = "DELETE:"; - // Do not crash if we cannot delete the file for some reason - //boost::filesystem::remove(entry.second.second); boost::system::error_code ec; boost::filesystem::remove(entry.second.second, ec); if (ec.failed()) { LL_WARNS() << "Failed to delete cache file " << entry.second.second << ": " << ec.message() << LL_ENDL; } - // } else { @@ -320,15 +315,12 @@ void LLDiskCache::clearCache() { if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos) { - // Do not crash if we cannot delete the file for some reason - //boost::filesystem::remove(entry); boost::system::error_code ec; boost::filesystem::remove(entry, ec); if (ec.failed()) { LL_WARNS() << "Failed to delete cache file " << entry << ": " << ec.message() << LL_ENDL; } - // } } } diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h index f2cc53d025..b89205016a 100644 --- a/indra/llfilesystem/lldiskcache.h +++ b/indra/llfilesystem/lldiskcache.h @@ -86,8 +86,6 @@ class LLDiskCache : * The maximum size of the cache in bytes - Based on the * setting at 'CacheSize' and 'DiskCachePercentOfTotal' */ - // Fix integer overflow - //const int max_size_bytes, const uintmax_t max_size_bytes, /** * A flag that enables extra cache debugging so that diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6c9ca58cfa..8a9b0a2063 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4979,8 +4979,6 @@ bool LLAppViewer::initCache() //const unsigned int disk_cache_mb = cache_total_size_mb * disk_cache_percent / 100; const unsigned int disk_cache_mb = gSavedSettings.getU32("FSDiskCacheSize"); // - // Fix integer overflow - //const unsigned int disk_cache_bytes = disk_cache_mb * 1024 * 1024; const uintmax_t disk_cache_bytes = disk_cache_mb * 1024 * 1024; const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo");