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

Unified Diff: core/fxcrt/fx_basic_maps.cpp

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « core/fxcrt/fx_basic_coords.cpp ('k') | core/fxcrt/fx_basic_util.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_basic_maps.cpp
diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp
index 48fb97082d8ad8481936bbc0dd1b05511438401b..149951aa2ee4f6c103a08902fb932dceaf9c29dc 100644
--- a/core/fxcrt/fx_basic_maps.cpp
+++ b/core/fxcrt/fx_basic_maps.cpp
@@ -58,14 +58,14 @@ void CFX_MapPtrToPtr::GetNextAssoc(FX_POSITION& rNextPosition,
rKey = pAssocRet->key;
rValue = pAssocRet->value;
}
-FX_BOOL CFX_MapPtrToPtr::Lookup(void* key, void*& rValue) const {
+bool CFX_MapPtrToPtr::Lookup(void* key, void*& rValue) const {
uint32_t nHash;
CAssoc* pAssoc = GetAssocAt(key, nHash);
if (!pAssoc) {
- return FALSE;
+ return false;
}
rValue = pAssoc->value;
- return TRUE;
+ return true;
}
void* CFX_MapPtrToPtr::GetValueAt(void* key) const {
@@ -120,7 +120,7 @@ CFX_MapPtrToPtr::CAssoc* CFX_MapPtrToPtr::NewAssoc() {
pAssoc->value = 0;
return pAssoc;
}
-void CFX_MapPtrToPtr::InitHashTable(uint32_t nHashSize, FX_BOOL bAllocNow) {
+void CFX_MapPtrToPtr::InitHashTable(uint32_t nHashSize, bool bAllocNow) {
ASSERT(m_nCount == 0);
ASSERT(nHashSize > 0);
FX_Free(m_pHashTable);
@@ -130,9 +130,9 @@ void CFX_MapPtrToPtr::InitHashTable(uint32_t nHashSize, FX_BOOL bAllocNow) {
}
m_nHashTableSize = nHashSize;
}
-FX_BOOL CFX_MapPtrToPtr::RemoveKey(void* key) {
+bool CFX_MapPtrToPtr::RemoveKey(void* key) {
if (!m_pHashTable) {
- return FALSE;
+ return false;
}
CAssoc** ppAssocPrev;
ppAssocPrev = &m_pHashTable[HashKey(key) % m_nHashTableSize];
@@ -141,11 +141,11 @@ FX_BOOL CFX_MapPtrToPtr::RemoveKey(void* key) {
if (pAssoc->key == key) {
*ppAssocPrev = pAssoc->pNext;
FreeAssoc(pAssoc);
- return TRUE;
+ return true;
}
ppAssocPrev = &pAssoc->pNext;
}
- return FALSE;
+ return false;
}
void CFX_MapPtrToPtr::FreeAssoc(CFX_MapPtrToPtr::CAssoc* pAssoc) {
pAssoc->pNext = m_pFreeList;
« no previous file with comments | « core/fxcrt/fx_basic_coords.cpp ('k') | core/fxcrt/fx_basic_util.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698