diff options
author | Richard Linden <none@none> | 2013-06-28 20:45:20 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-06-28 20:45:20 -0700 |
commit | ffa7123bb5187e1da491a8f475d696053d9c9ee4 (patch) | |
tree | c93505d62775737dd087695ced75f6c4d8f10d6a /indra/llcommon/llpointer.h | |
parent | 0f178ec33debc6d92f3b2aa2392e640eb342a095 (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-x | indra/llcommon/llpointer.h | 18 |
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 |