summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluuidhashmap.h
diff options
context:
space:
mode:
authorKaren Clark <karen@lindenlab.com>2007-03-20 22:21:42 +0000
committerKaren Clark <karen@lindenlab.com>2007-03-20 22:21:42 +0000
commitfceae96eb171be0396512e251aab311d4e3ef9cc (patch)
treee648d1dd42aeae4d47168bd8d696ff0895819b8b /indra/llcommon/lluuidhashmap.h
parent5e9e67cb2d1d3dfc82dfe96103270b2341991ddd (diff)
svn merge -r59459:59476 svn+ssh://svn.lindenlab.com/svn/linden/branches/adroit.r69-75_2 into svn+ssh://svn.lindenlab.com/svn/linden/release.
Diffstat (limited to 'indra/llcommon/lluuidhashmap.h')
-rw-r--r--indra/llcommon/lluuidhashmap.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcommon/lluuidhashmap.h b/indra/llcommon/lluuidhashmap.h
index f7d32b1fe0..98a269b1a4 100644
--- a/indra/llcommon/lluuidhashmap.h
+++ b/indra/llcommon/lluuidhashmap.h
@@ -206,7 +206,7 @@ inline S32 LLUUIDHashMap<DATA_TYPE, SIZE>::getLength() const
S32 bin;
for (bin = 0; bin < 256; bin++)
{
- LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[bin];
+ LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = (LLUUIDHashNode<DATA_TYPE, SIZE>*) &mNodes[bin];
while (nodep)
{
count += nodep->mCount;
@@ -421,6 +421,7 @@ public:
~LLUUIDHashMapIter();
+ inline void reset();
inline void first();
inline void next();
inline BOOL done() const;
@@ -460,10 +461,17 @@ LLUUIDHashMapIter<DATA_TYPE, SIZE>::LLUUIDHashMapIter(LLUUIDHashMap<DATA_TYPE, S
template <class DATA_TYPE, int SIZE>
LLUUIDHashMapIter<DATA_TYPE, SIZE>::~LLUUIDHashMapIter()
{
+ reset();
+}
+
+template <class DATA_TYPE, int SIZE>
+inline void LLUUIDHashMapIter<DATA_TYPE, SIZE>::reset()
+{
if (mCurHashNodep)
{
// We're partway through an iteration, we can clean up now
mHashMapp->mIterCount--;
+ mCurHashNodep = NULL;
}
}