summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-27 19:04:26 -0500
committerOz Linden <oz@lindenlab.com>2011-01-27 19:04:26 -0500
commitee2678be57668844221a462ed1e215c3c7cbd841 (patch)
tree5c88a0e1609b13eb5c843c50a323a39b00ff89b7 /indra/newview/llvocache.h
parent7b7e9b0d0bd9c35acb346ae359f9a08a48b248a2 (diff)
parent1e346e085d9af460657342f20d8fde45b6982913 (diff)
merge beta tags
Diffstat (limited to 'indra/newview/llvocache.h')
-rw-r--r--indra/newview/llvocache.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index ed2bc8bafe..14e3b4c793 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -95,7 +95,12 @@ private:
{
bool operator()(const HeaderEntryInfo* lhs, const HeaderEntryInfo* rhs) const
{
- return lhs->mTime < rhs->mTime; // older entry in front of queue (set)
+ if(lhs->mTime == rhs->mTime)
+ {
+ return lhs < rhs ;
+ }
+
+ return lhs->mTime < rhs->mTime ; // older entry in front of queue (set)
}
};
typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t;
@@ -111,6 +116,7 @@ public:
void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache) ;
+ void removeEntry(U64 handle) ;
void setReadOnly(BOOL read_only) {mReadOnly = read_only;}
@@ -118,15 +124,14 @@ private:
void setDirNames(ELLPath location);
// determine the cache filename for the region from the region handle
void getObjectCacheFilename(U64 handle, std::string& filename);
- void removeFromCache(U64 handle);
+ void removeFromCache(HeaderEntryInfo* entry);
void readCacheHeader();
void writeCacheHeader();
void clearCacheInMemory();
void removeCache() ;
- void purgeEntries();
+ void removeEntry(HeaderEntryInfo* entry) ;
+ void purgeEntries(U32 size);
BOOL updateEntry(const HeaderEntryInfo* entry);
- BOOL checkRead(LLAPRFile* apr_file, void* src, S32 n_bytes) ;
- BOOL checkWrite(LLAPRFile* apr_file, void* src, S32 n_bytes) ;
private:
BOOL mEnabled;