From 8ae550996c70df16b707f6773666b93409123689 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 16 May 2011 13:48:55 -0500
Subject: [PATCH] Merge cleanup.

---
 indra/newview/llmeshrepository.cpp |  1 +
 indra/newview/llviewerregion.cpp   | 40 ++++++++++++++----------------
 2 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2a68fbac8d2..0a1eadf4d05 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -35,6 +35,7 @@
 #include "llappviewer.h"
 #include "llbufferstream.h"
 #include "llcurl.h"
+#include "lldatapacker.h"
 #include "llfasttimer.h"
 #include "llfloatermodelpreview.h"
 #include "llfloaterperms.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 46cf9a24e93..f835351c043 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1187,34 +1187,32 @@ LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type)
 {
 	//llassert(mCacheLoaded);  This assert failes often, changing to early-out -- davep, 2010/10/18
 
-	if (mCacheLoaded)
-	{
-		LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL);
+	LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL);
 
-		if (entry)
+	if (entry)
+	{
+		// we've seen this object before
+		if (entry->getCRC() == crc)
 		{
-			// we've seen this object before
-			if (entry->getCRC() == crc)
-			{
-				// Record a hit
-				entry->recordHit();
-			cache_miss_type = CACHE_MISS_TYPE_NONE;
-				return entry->getDP(crc);
-			}
-			else
-			{
-				// llinfos << "CRC miss for " << local_id << llendl;
-			cache_miss_type = CACHE_MISS_TYPE_CRC;
-				mCacheMissCRC.put(local_id);
-			}
+			// Record a hit
+			entry->recordHit();
+		cache_miss_type = CACHE_MISS_TYPE_NONE;
+			return entry->getDP(crc);
 		}
 		else
 		{
-			// llinfos << "Cache miss for " << local_id << llendl;
-		cache_miss_type = CACHE_MISS_TYPE_FULL;
-			mCacheMissFull.put(local_id);
+			// llinfos << "CRC miss for " << local_id << llendl;
+		cache_miss_type = CACHE_MISS_TYPE_CRC;
+			mCacheMissCRC.put(local_id);
 		}
 	}
+	else
+	{
+		// llinfos << "Cache miss for " << local_id << llendl;
+	cache_miss_type = CACHE_MISS_TYPE_FULL;
+		mCacheMissFull.put(local_id);
+	}
+
 	return NULL;
 }
 
-- 
GitLab