aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/lluuidhashmap.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llcommon/lluuidhashmap.h
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llcommon/lluuidhashmap.h')
-rw-r--r--linden/indra/llcommon/lluuidhashmap.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/linden/indra/llcommon/lluuidhashmap.h b/linden/indra/llcommon/lluuidhashmap.h
index 44cd925..77609e0 100644
--- a/linden/indra/llcommon/lluuidhashmap.h
+++ b/linden/indra/llcommon/lluuidhashmap.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2003-2007, Linden Research, Inc. 5 * Copyright (c) 2003-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -225,7 +226,7 @@ inline S32 LLUUIDHashMap<DATA_TYPE, SIZE>::getLength() const
225 S32 bin; 226 S32 bin;
226 for (bin = 0; bin < 256; bin++) 227 for (bin = 0; bin < 256; bin++)
227 { 228 {
228 LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[bin]; 229 LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = (LLUUIDHashNode<DATA_TYPE, SIZE>*) &mNodes[bin];
229 while (nodep) 230 while (nodep)
230 { 231 {
231 count += nodep->mCount; 232 count += nodep->mCount;
@@ -440,6 +441,7 @@ public:
440 ~LLUUIDHashMapIter(); 441 ~LLUUIDHashMapIter();
441 442
442 443
444 inline void reset();
443 inline void first(); 445 inline void first();
444 inline void next(); 446 inline void next();
445 inline BOOL done() const; 447 inline BOOL done() const;
@@ -479,10 +481,17 @@ LLUUIDHashMapIter<DATA_TYPE, SIZE>::LLUUIDHashMapIter(LLUUIDHashMap<DATA_TYPE, S
479template <class DATA_TYPE, int SIZE> 481template <class DATA_TYPE, int SIZE>
480LLUUIDHashMapIter<DATA_TYPE, SIZE>::~LLUUIDHashMapIter() 482LLUUIDHashMapIter<DATA_TYPE, SIZE>::~LLUUIDHashMapIter()
481{ 483{
484 reset();
485}
486
487template <class DATA_TYPE, int SIZE>
488inline void LLUUIDHashMapIter<DATA_TYPE, SIZE>::reset()
489{
482 if (mCurHashNodep) 490 if (mCurHashNodep)
483 { 491 {
484 // We're partway through an iteration, we can clean up now 492 // We're partway through an iteration, we can clean up now
485 mHashMapp->mIterCount--; 493 mHashMapp->mIterCount--;
494 mCurHashNodep = NULL;
486 } 495 }
487} 496}
488 497