From e8d3691c82d1be805ffdce3329d00313af7ce0ab Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Jun 2015 15:09:45 -0700 Subject: Replace CFX_MapPtrTemplate with std::map. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1181593003. --- core/include/fxcrt/fx_basic.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'core/include/fxcrt') diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 0083825bb0..d575df6e67 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -853,46 +853,7 @@ protected: CAssoc* GetAssocAt(void* key, FX_DWORD& hash) const; }; -template -class CFX_MapPtrTemplate : public CFX_MapPtrToPtr -{ -public: - CFX_MapPtrTemplate() : CFX_MapPtrToPtr(10) {} - - FX_BOOL Lookup(KeyType key, ValueType& rValue) const - { - void* pValue = NULL; - if (!CFX_MapPtrToPtr::Lookup((void*)(uintptr_t)key, pValue)) { - return FALSE; - } - rValue = (ValueType)(uintptr_t)pValue; - return TRUE; - } - - ValueType& operator[](KeyType key) - { - return (ValueType&)CFX_MapPtrToPtr::operator []((void*)(uintptr_t)key); - } - - void SetAt(KeyType key, ValueType newValue) - { - CFX_MapPtrToPtr::SetAt((void*)(uintptr_t)key, (void*)(uintptr_t)newValue); - } - - FX_BOOL RemoveKey(KeyType key) - { - return CFX_MapPtrToPtr::RemoveKey((void*)(uintptr_t)key); - } - void GetNextAssoc(FX_POSITION& rNextPosition, KeyType& rKey, ValueType& rValue) const - { - void* pKey = NULL; - void* pValue = NULL; - CFX_MapPtrToPtr::GetNextAssoc(rNextPosition, pKey, pValue); - rKey = (KeyType)(uintptr_t)pKey; - rValue = (ValueType)(uintptr_t)pValue; - } -}; class CFX_CMapDWordToDWord { public: -- cgit v1.2.3