summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSabrina Shanman <cosmic@lindenlab.com>2022-06-24 21:34:15 +0000
committerSabrina Shanman <cosmic@lindenlab.com>2022-06-24 21:34:15 +0000
commit46e0459c82eaa6444bf79671a41014c4eb83a993 (patch)
treeed7aa512454a389fb959479392e5572b3bc7d177
parent8728a68bb7ec583912d78c3d2844d82df3483e7c (diff)
parent7bf25aa8b8d168142a208e2b02af047c445aacb0 (diff)
Merged in SL-17329 (pull request #1036)
SL-17329: Address Mac build error Approved-by: Andrey Lihatskiy
-rw-r--r--indra/llfilesystem/lldiskcache.cpp1
-rw-r--r--indra/newview/llappviewer.cpp12
2 files changed, 6 insertions, 7 deletions
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index 74955df50a..48d6ed8a68 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -146,7 +146,6 @@ void LLDiskCache::purge()
{
file_removed.push_back(should_remove);
}
- std::string action = "";
if (should_remove)
{
boost::filesystem::remove(entry.second.second, ec);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0adbdb3647..b74cb4aa65 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4260,16 +4260,16 @@ bool LLAppViewer::initCache()
const std::string cache_dir_name = gSavedSettings.getString("DiskCacheDirName");
const U32 MB = 1024 * 1024;
- const U64 MIN_CACHE_SIZE = 256 * MB;
- const U64 MAX_CACHE_SIZE = 9984ll * MB;
- const uintmax_t setting_cache_total_size = (uintmax_t)gSavedSettings.getU32("CacheSize") * MB;
+ const uintmax_t MIN_CACHE_SIZE = 256 * MB;
+ const uintmax_t MAX_CACHE_SIZE = 9984ll * MB;
+ const uintmax_t setting_cache_total_size = uintmax_t(gSavedSettings.getU32("CacheSize")) * MB;
const uintmax_t cache_total_size = llclamp(setting_cache_total_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
- const F32 disk_cache_percent = gSavedSettings.getF32("DiskCachePercentOfTotal");
- const F32 texture_cache_percent = 100.0 - disk_cache_percent;
+ const F64 disk_cache_percent = gSavedSettings.getF32("DiskCachePercentOfTotal");
+ const F64 texture_cache_percent = 100.0 - disk_cache_percent;
// note that the maximum size of this cache is defined as a percentage of the
// total cache size - the 'CacheSize' pref - for all caches.
- const uintmax_t disk_cache_size = cache_total_size * disk_cache_percent / 100;
+ const uintmax_t disk_cache_size = uintmax_t(cache_total_size * disk_cache_percent / 100);
const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo");
bool texture_cache_mismatch = false;