summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_maps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_basic_maps.cpp')
-rw-r--r--core/fxcrt/fx_basic_maps.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp
index eb4f2868f5..bad1868286 100644
--- a/core/fxcrt/fx_basic_maps.cpp
+++ b/core/fxcrt/fx_basic_maps.cpp
@@ -39,19 +39,16 @@ void CFX_MapPtrToPtr::GetNextAssoc(FX_POSITION& rNextPosition,
ASSERT(pAssocRet);
if (pAssocRet == (CAssoc*)-1) {
for (FX_DWORD nBucket = 0; nBucket < m_nHashTableSize; nBucket++) {
- if ((pAssocRet = m_pHashTable[nBucket]))
+ pAssocRet = m_pHashTable[nBucket];
+ if (pAssocRet)
break;
}
ASSERT(pAssocRet);
}
- CAssoc* pAssocNext;
- if ((pAssocNext = pAssocRet->pNext) == NULL) {
- for (FX_DWORD nBucket = (HashKey(pAssocRet->key) % m_nHashTableSize) + 1;
- nBucket < m_nHashTableSize; nBucket++) {
- if ((pAssocNext = m_pHashTable[nBucket])) {
- break;
- }
- }
+ CAssoc* pAssocNext = pAssocRet->pNext;
+ for (FX_DWORD nBucket = (HashKey(pAssocRet->key) % m_nHashTableSize) + 1;
+ nBucket < m_nHashTableSize && !pAssocNext; nBucket++) {
+ pAssocNext = m_pHashTable[nBucket];
}
rNextPosition = (FX_POSITION)pAssocNext;
rKey = pAssocRet->key;