diff options
author | Don Kjer <don@lindenlab.com> | 2010-12-22 14:23:35 -0800 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2010-12-22 14:23:35 -0800 |
commit | 649dd6eb74023d48379ebaadd2ff000801306f17 (patch) | |
tree | 83a42667d25294f8b54378324a08f7ffb2105731 /indra/newview/llviewerregion.cpp | |
parent | 14e402cf5e8274caddaf1c763c2e044c53514b1e (diff) |
Cleanup from review with Andrew and Merov
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index ea6f1ab342..4648f318d4 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1049,33 +1049,29 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec entry->recordDupe(); return CACHE_UPDATE_DUPE; } - else - { - // Update the cache entry - mCacheMap.erase(local_id); - delete entry; - entry = new LLVOCacheEntry(local_id, crc, dp); - mCacheMap[local_id] = entry; - return CACHE_UPDATE_CHANGED; - } - } - else - { - // we haven't seen this object before - // Create new entry and add to map - eCacheUpdateResult result = CACHE_UPDATE_ADDED; - if (mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) - { - mCacheMap.erase(mCacheMap.begin()); - result = CACHE_UPDATE_REPLACED; - - } + // Update the cache entry + mCacheMap.erase(local_id); + delete entry; entry = new LLVOCacheEntry(local_id, crc, dp); - mCacheMap[local_id] = entry; - return result; + return CACHE_UPDATE_CHANGED; + } + + // we haven't seen this object before + + // Create new entry and add to map + eCacheUpdateResult result = CACHE_UPDATE_ADDED; + if (mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) + { + mCacheMap.erase(mCacheMap.begin()); + result = CACHE_UPDATE_REPLACED; + } + entry = new LLVOCacheEntry(local_id, crc, dp); + + mCacheMap[local_id] = entry; + return result; } // Get data packer for this object, if we have cached data |