From 09d33bcd82a82cb55039d41651df13e17d6c3e59 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 19 Aug 2015 09:49:24 -0700 Subject: Merge to XFA: CFX_MapByteStringToPtr considered harmful (combo patch). New manual edits: two unused members deleted, one adapted. fde_csscache.cpp fde_csscache.h fpdfxfa_doc.h fx_ge_fontmap.cpp (cherry picked from commit 1d9dbd53b205b2b4d9e75a7eeb95e80837917ea3) (cherry picked from commit cb4d0ea68308e3c51a6ba9551b393bb2f639afc4) (cherry picked from commit 9cf44c2ed09a8b2ff243eb6dbb72a8cceae1b5ff) (cherry picked from commit 2a2a6aa7f51352fc481e78f6ad9d41f2738bcc48) (cherry picked from commit ce4ffb8183af3fa2bb5133f0f7370a88e064c516) Original Review URL: https://codereview.chromium.org/1297723002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1301793002 . --- core/include/fxcrt/fx_basic.h | 69 ------------------------------------------- 1 file changed, 69 deletions(-) (limited to 'core/include/fxcrt/fx_basic.h') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 54c78eaf3d..71c664ceb1 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -757,75 +757,6 @@ class CFX_CMapDWordToDWord { protected: CFX_BinaryBuf m_Buffer; }; -class CFX_MapByteStringToPtr { - protected: - struct CAssoc { - CAssoc* pNext; - - FX_DWORD nHashValue; - - CFX_ByteString key; - - void* value; - }; - - public: - CFX_MapByteStringToPtr(int nBlockSize = 10); - - int GetCount() const { return m_nCount; } - - FX_BOOL IsEmpty() const { return m_nCount == 0; } - - FX_BOOL Lookup(const CFX_ByteStringC& key, void*& rValue) const; - - void*& operator[](const CFX_ByteStringC& key); - - void SetAt(const CFX_ByteStringC& key, void* newValue) { - (*this)[key] = newValue; - } - - FX_BOOL RemoveKey(const CFX_ByteStringC& key); - - void RemoveAll(); - - FX_POSITION GetStartPosition() const { - return (m_nCount == 0) ? NULL : (FX_POSITION)-1; - } - - void GetNextAssoc(FX_POSITION& rNextPosition, - CFX_ByteString& rKey, - void*& rValue) const; - - void* GetNextValue(FX_POSITION& rNextPosition) const; - - FX_DWORD GetHashTableSize() const { return m_nHashTableSize; } - - void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE); - - FX_DWORD HashKey(const CFX_ByteStringC& key) const; - - protected: - CAssoc** m_pHashTable; - - FX_DWORD m_nHashTableSize; - - int m_nCount; - - CAssoc* m_pFreeList; - - struct CFX_Plex* m_pBlocks; - - int m_nBlockSize; - - CAssoc* NewAssoc(); - - void FreeAssoc(CAssoc* pAssoc); - - CAssoc* GetAssocAt(const CFX_ByteStringC& key, FX_DWORD& hash) const; - - public: - ~CFX_MapByteStringToPtr(); -}; class CFX_CMapByteStringToPtr { public: CFX_CMapByteStringToPtr(); -- cgit v1.2.3