summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-09-22 13:40:59 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-09-22 13:40:59 +0100
commitb8337bdd2ce2d07b23eb0354adfef984fb218b9a (patch)
tree5894596142a75216d7182675cc235e2f7cf9a121 /indra
parent240ab6f0dfeb90bf876d76e2a4d4bd38abba2e1b (diff)
CID-510
Checker: UNINIT_CTOR Function: LLVOCache::LLVOCache() File: /indra/newview/llvocache.cpp
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvocache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index d76634663d..8bdb8e069e 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -259,7 +259,8 @@ void LLVOCache::destroyClass()
LLVOCache::LLVOCache():
mInitialized(FALSE),
mReadOnly(TRUE),
- mNumEntries(0)
+ mNumEntries(0),
+ mCacheSize(1)
{
mLocalAPRFilePoolp = new LLVolatileAPRPool() ;
}
@@ -291,8 +292,8 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version)
{
LLFile::mkdir(mObjectCacheDirName);
}
- mCacheSize = llmin(size, MAX_NUM_OBJECT_ENTRIES) ;
- mCacheSize = llmax(mCacheSize, NUM_ENTRIES_TO_PURGE);
+ mCacheSize = llclamp(size,
+ MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE);
mMetaInfo.mVersion = cache_version;
readCacheHeader();