summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluuidhashmap.h
diff options
context:
space:
mode:
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;
}
}