summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpointer.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-28 20:45:20 -0700
committerRichard Linden <none@none>2013-06-28 20:45:20 -0700
commitffa7123bb5187e1da491a8f475d696053d9c9ee4 (patch)
treec93505d62775737dd087695ced75f6c4d8f10d6a /indra/llcommon/llpointer.h
parent0f178ec33debc6d92f3b2aa2392e640eb342a095 (diff)
SH-4299 FIX Interesting: High fps shown temporarily off scale in statistics console
added ability to force uniqueness of LLCopyOnWritePointer converted more variables to units added convenience function for unit constants
Diffstat (limited to 'indra/llcommon/llpointer.h')
-rwxr-xr-xindra/llcommon/llpointer.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
index 6a0a8fcb0d..c827996db1 100755
--- a/indra/llcommon/llpointer.h
+++ b/indra/llcommon/llpointer.h
@@ -173,15 +173,23 @@ public:
typedef LLPointer<Type> pointer_t;
LLCopyOnWritePointer()
+ : mStayUnique(false)
{}
LLCopyOnWritePointer(Type* ptr)
- : LLPointer<Type>(ptr)
+ : LLPointer<Type>(ptr),
+ mStayUnique(false)
{}
LLCopyOnWritePointer(LLPointer<Type>& ptr)
- : LLPointer<Type>(ptr)
- {}
+ : LLPointer<Type>(ptr),
+ mStayUnique(false)
+ {
+ if (ptr.mForceUnique)
+ {
+ makeUnique();
+ }
+ }
Type* write()
{
@@ -199,6 +207,10 @@ public:
const Type* operator->() const { return pointer_t::mPointer; }
const Type& operator*() const { return *pointer_t::mPointer; }
+
+ void setStayUnique(bool stay) { makeUnique(); mStayUnique = stay; }
+private:
+ bool mStayUnique;
};
#endif