Chromium Code Reviews| Index: core/fxcrt/fx_basic_maps.cpp |
| diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp |
| index eb4f2868f52683a973356d1f55a81f19ea9c93fa..812b14553137d6ffef2e3452f3624bd10bc289cc 100644 |
| --- a/core/fxcrt/fx_basic_maps.cpp |
| +++ b/core/fxcrt/fx_basic_maps.cpp |
| @@ -39,7 +39,7 @@ 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])) |
| + if ((pAssocRet = m_pHashTable[nBucket]) != nullptr) |
|
Tom Sepez
2016/03/16 18:34:59
what's the warning here?
Wei Li
2016/03/17 02:24:05
assignment in condition expression
|
| break; |
| } |
| ASSERT(pAssocRet); |
| @@ -48,7 +48,7 @@ void CFX_MapPtrToPtr::GetNextAssoc(FX_POSITION& rNextPosition, |
| if ((pAssocNext = pAssocRet->pNext) == NULL) { |
|
Tom Sepez
2016/03/16 18:34:59
nit: move assignment to line 47/
Wei Li
2016/03/17 02:24:05
Done.
|
| for (FX_DWORD nBucket = (HashKey(pAssocRet->key) % m_nHashTableSize) + 1; |
| nBucket < m_nHashTableSize; nBucket++) { |
|
Tom Sepez
2016/03/16 18:34:59
I think if you add && !pAssocNext to the loop cond
Wei Li
2016/03/17 02:24:05
Done.
|
| - if ((pAssocNext = m_pHashTable[nBucket])) { |
| + if ((pAssocNext = m_pHashTable[nBucket]) != nullptr) { |
| break; |
| } |
| } |