From 074c1f1de45f60059c97cf9cfd0bbb9fddbb52c4 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 29 May 2013 17:02:27 -0700
Subject: [PATCH] SH-3931 WIP Interesting: Add graphs to visualize scene load
 metrics made LLCopyOnWritePointer enforce write access through write() again
 disabled some error checking on release for download builds

---
 indra/llcommon/llpointer.h | 3 +++
 indra/llcommon/lltrace.h   | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
index c83e55577de..e640ffd5950 100644
--- a/indra/llcommon/llpointer.h
+++ b/indra/llcommon/llpointer.h
@@ -196,6 +196,9 @@ class LLCopyOnWritePointer : public LLPointer<Type>
 			*(pointer_t*)(this) = new Type(*pointer_t::mPointer);
 		}
 	}
+
+	const Type*	operator->() const	{ return pointer_t::mPointer; }
+	const Type&	operator*() const	{ return *pointer_t::mPointer; }
 };
 
 #endif
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index f94576de45c..e950a119d3a 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -175,10 +175,12 @@ class AccumulatorBuffer : public LLRefCount
 	// NOTE: this is not thread-safe.  We assume that slots are reserved in the main thread before any child threads are spawned
 	size_t reserveSlot()
 	{
+#ifndef LL_RELEASE_FOR_DOWNLOAD
 		if (LLTrace::isInitialized())
 		{
 			llerrs << "Attempting to declare trace object after program initialization.  Trace objects should be statically initialized." << llendl;
 		}
+#endif
 		size_t next_slot = sNextStorageSlot++;
 		if (next_slot >= mStorageSize)
 		{
-- 
GitLab