diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
commit | 6f0a64a1bf18ab6636404cdfb883897459083a4d (patch) | |
tree | 1ef1326c8bb015213e0cdf0d726a27a537d09c73 /core/src/fxcrt/fx_basic_maps.cpp | |
parent | e4503ea9947d2f9c61704da20271b413a364a9c0 (diff) | |
download | pdfium-chromium/2430.tar.xz |
Remove FX_BSTR and FX_WSTR typedefs.chromium/2434chromium/2433chromium/2432chromium/2431chromium/2430
These stand for const CFX_{Byte,Wide}StringC&, which is just
monumentally confusing, since there are so many string types
running around here.
The following had manual changes:
core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfdoc/doc_form.cpp
fpdfsdk/src/fpdf_ext.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1180593004.
Diffstat (limited to 'core/src/fxcrt/fx_basic_maps.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_maps.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp index 7df4cdb8ed..afc7c8219e 100644 --- a/core/src/fxcrt/fx_basic_maps.cpp +++ b/core/src/fxcrt/fx_basic_maps.cpp @@ -261,7 +261,7 @@ void* CFX_MapByteStringToPtr::GetNextValue(FX_POSITION& rNextPosition) const rNextPosition = (FX_POSITION) pAssocNext; return pAssocRet->value; } -void*& CFX_MapByteStringToPtr::operator[](FX_BSTR key) +void*& CFX_MapByteStringToPtr::operator[](const CFX_ByteStringC& key) { FX_DWORD nHash; CAssoc* pAssoc; @@ -310,7 +310,7 @@ void CFX_MapByteStringToPtr::FreeAssoc(CFX_MapByteStringToPtr::CAssoc* pAssoc) } } CFX_MapByteStringToPtr::CAssoc* -CFX_MapByteStringToPtr::GetAssocAt(FX_BSTR key, FX_DWORD& nHash) const +CFX_MapByteStringToPtr::GetAssocAt(const CFX_ByteStringC& key, FX_DWORD& nHash) const { nHash = HashKey(key) % m_nHashTableSize; if (m_pHashTable == NULL) { @@ -324,7 +324,7 @@ CFX_MapByteStringToPtr::GetAssocAt(FX_BSTR key, FX_DWORD& nHash) const } return NULL; } -FX_BOOL CFX_MapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const +FX_BOOL CFX_MapByteStringToPtr::Lookup(const CFX_ByteStringC& key, void*& rValue) const { FX_DWORD nHash; CAssoc* pAssoc = GetAssocAt(key, nHash); @@ -348,7 +348,7 @@ void CFX_MapByteStringToPtr::InitHashTable( } m_nHashTableSize = nHashSize; } -inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const +inline FX_DWORD CFX_MapByteStringToPtr::HashKey(const CFX_ByteStringC& key) const { FX_DWORD nHash = 0; int len = key.GetLength(); @@ -358,7 +358,7 @@ inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const } return nHash; } -FX_BOOL CFX_MapByteStringToPtr::RemoveKey(FX_BSTR key) +FX_BOOL CFX_MapByteStringToPtr::RemoveKey(const CFX_ByteStringC& key) { if (m_pHashTable == NULL) { return FALSE; @@ -500,7 +500,7 @@ FX_BOOL _CMapLookupCallback(void* param, void* pData) { return !_CompactStringSame((_CompactString*)pData, ((CFX_ByteStringC*)param)->GetPtr(), ((CFX_ByteStringC*)param)->GetLength()); } -FX_BOOL CFX_CMapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const +FX_BOOL CFX_CMapByteStringToPtr::Lookup(const CFX_ByteStringC& key, void*& rValue) const { void* p = m_Buffer.Iterate(_CMapLookupCallback, (void*)&key); if (!p) { @@ -509,7 +509,7 @@ FX_BOOL CFX_CMapByteStringToPtr::Lookup(FX_BSTR key, void*& rValue) const rValue = *(void**)((_CompactString*)p + 1); return TRUE; } -void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value) +void CFX_CMapByteStringToPtr::SetAt(const CFX_ByteStringC& key, void* value) { ASSERT(value != NULL); int index, key_len = key.GetLength(); @@ -535,14 +535,14 @@ void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value) _CompactStringStore(pKey, key.GetPtr(), key_len); *(void**)(pKey + 1) = value; } -void CFX_CMapByteStringToPtr::AddValue(FX_BSTR key, void* value) +void CFX_CMapByteStringToPtr::AddValue(const CFX_ByteStringC& key, void* value) { ASSERT(value != NULL); _CompactString* pKey = (_CompactString*)m_Buffer.Add(); _CompactStringStore(pKey, key.GetPtr(), key.GetLength()); *(void**)(pKey + 1) = value; } -void CFX_CMapByteStringToPtr::RemoveKey(FX_BSTR key) +void CFX_CMapByteStringToPtr::RemoveKey(const CFX_ByteStringC& key) { int key_len = key.GetLength(); int size = m_Buffer.GetSize(); |