diff options
author | Josh Bell <josh@lindenlab.com> | 2007-04-11 17:54:18 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-04-11 17:54:18 +0000 |
commit | 0277259455c4354f81ea8a24c8ab93f27567bc6f (patch) | |
tree | f1411dab563dcf697f794e9e8a592a6d3e5c4d2d /indra/llcommon/llmemory.h | |
parent | 568397bbcc4fca307ebc010ec7f815422b9ba80a (diff) |
svn merge -r 59968:60342 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rw-r--r-- | indra/llcommon/llmemory.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 2a58db659e..1253d34a7d 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -174,6 +174,14 @@ public: } return *this; } + + // Just exchange the pointers, which will not change the reference counts. + static void swap(LLPointer<Type>& a, LLPointer<Type>& b) + { + Type* temp = a.mPointer; + a.mPointer = b.mPointer; + b.mPointer = temp; + } protected: void ref() |