From b208774174e102da9f218d89bf8a3af7a0e37f09 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 22 Apr 2015 12:29:21 -0700 Subject: Merge to XFA: Add missing operators for CFX_xxxString combo patch. This pulls in: Review URL: https://codereview.chromium.org/1099193002 Review URL: https://codereview.chromium.org/1090303003 Review URL: https://codereview.chromium.org/1084293003 Review URL: https://codereview.chromium.org/1099213002 Plus one fix to an XFA file to fix compilation. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1095893005 --- core/src/fxcrt/fx_basic_maps.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/src/fxcrt/fx_basic_maps.cpp') diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp index e85d35e4ac..8ae44ce6a0 100644 --- a/core/src/fxcrt/fx_basic_maps.cpp +++ b/core/src/fxcrt/fx_basic_maps.cpp @@ -352,7 +352,7 @@ inline FX_DWORD CFX_MapByteStringToPtr::HashKey(FX_BSTR key) const { FX_DWORD nHash = 0; int len = key.GetLength(); - FX_LPCBYTE buf = key; + FX_LPCBYTE buf = key.GetPtr(); for (int i = 0; i < len; i ++) { nHash = (nHash << 5) + nHash + buf[i]; } @@ -518,7 +518,7 @@ void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value) int size = m_Buffer.GetSize(); for (index = 0; index < size; index ++) { _CompactString* pKey = (_CompactString*)m_Buffer.GetAt(index); - if (!_CompactStringSame(pKey, (FX_LPCBYTE)key, key_len)) { + if (!_CompactStringSame(pKey, key.GetPtr(), key_len)) { continue; } *(void**)(pKey + 1) = value; @@ -529,19 +529,19 @@ void CFX_CMapByteStringToPtr::SetAt(FX_BSTR key, void* value) if (pKey->m_CompactLen) { continue; } - _CompactStringStore(pKey, (FX_LPCBYTE)key, key_len); + _CompactStringStore(pKey, key.GetPtr(), key_len); *(void**)(pKey + 1) = value; return; } _CompactString* pKey = (_CompactString*)m_Buffer.Add(); - _CompactStringStore(pKey, (FX_LPCBYTE)key, key_len); + _CompactStringStore(pKey, key.GetPtr(), key_len); *(void**)(pKey + 1) = value; } void CFX_CMapByteStringToPtr::AddValue(FX_BSTR key, void* value) { ASSERT(value != NULL); _CompactString* pKey = (_CompactString*)m_Buffer.Add(); - _CompactStringStore(pKey, (FX_LPCBYTE)key, key.GetLength()); + _CompactStringStore(pKey, key.GetPtr(), key.GetLength()); *(void**)(pKey + 1) = value; } void CFX_CMapByteStringToPtr::RemoveKey(FX_BSTR key) @@ -550,7 +550,7 @@ void CFX_CMapByteStringToPtr::RemoveKey(FX_BSTR key) int size = m_Buffer.GetSize(); for (int index = 0; index < size; index++) { _CompactString* pKey = (_CompactString*)m_Buffer.GetAt(index); - if (!_CompactStringSame(pKey, (FX_LPCBYTE)key, key_len)) { + if (!_CompactStringSame(pKey, key.GetPtr(), key_len)) { continue; } _CompactStringRelease(pKey); -- cgit v1.2.3