From b8337bdd2ce2d07b23eb0354adfef984fb218b9a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 22 Sep 2010 13:40:59 +0100 Subject: CID-510 Checker: UNINIT_CTOR Function: LLVOCache::LLVOCache() File: /indra/newview/llvocache.cpp --- indra/newview/llvocache.cpp | 7 ++++--- 1 file 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(); -- cgit v1.2.3