Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2389)

Unified Diff: core/fxcrt/fx_basic_maps.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
}

Powered by Google App Engine
This is Rietveld 408576698