summaryrefslogtreecommitdiff
path: root/indra/llui/llhandle.h
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-10-26 13:05:54 -0700
committerRick Pasetto <rick@lindenlab.com>2009-10-26 13:05:54 -0700
commit1d67a9084199910d35a44ac427a07fc1d9d6a4fd (patch)
tree4d942a13d1fd358a8a10a67554ea9a85b7f04c6f /indra/llui/llhandle.h
parent19fc3fb32c3cd95fcfb5708b59b5620e506c5179 (diff)
parente84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (diff)
merge with remote repo
Diffstat (limited to 'indra/llui/llhandle.h')
-rw-r--r--indra/llui/llhandle.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h
index 10a7fd4544..899f6b9326 100644
--- a/indra/llui/llhandle.h
+++ b/indra/llui/llhandle.h
@@ -60,7 +60,7 @@ template <typename T>
class LLHandle
{
public:
- LLHandle() : mTombStone(sDefaultTombStone) {}
+ LLHandle() : mTombStone(getDefaultTombStone()) {}
const LLHandle<T>& operator =(const LLHandle<T>& other)
{
mTombStone = other.mTombStone;
@@ -74,7 +74,7 @@ public:
void markDead()
{
- mTombStone = sDefaultTombStone;
+ mTombStone = getDefaultTombStone();
}
T* get() const
@@ -104,13 +104,13 @@ protected:
LLPointer<LLTombStone<T> > mTombStone;
private:
- static LLPointer<LLTombStone<T> > sDefaultTombStone;
+ static LLPointer<LLTombStone<T> >& getDefaultTombStone()
+ {
+ static LLPointer<LLTombStone<T> > sDefaultTombStone = new LLTombStone<T>;
+ return sDefaultTombStone;
+ }
};
-// initialize static "empty" tombstone pointer
-template <typename T> LLPointer<LLTombStone<T> > LLHandle<T>::sDefaultTombStone = new LLTombStone<T>();
-
-
template <typename T>
class LLRootHandle : public LLHandle<T>
{