summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-20 14:06:23 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-20 14:06:23 -0800
commita505d9d3e13485e090e50d5d83f882fb707d3f48 (patch)
tree72c7544f2c52bc22ca92af611cbd7d68f662622b /core/include
parent2a312f90dbf5da8b930dee814db786965792961a (diff)
downloadpdfium-a505d9d3e13485e090e50d5d83f882fb707d3f48.tar.xz
Replace more CFX_MapPtrToPtr and remove it.
Still used by XFA, so the merge will make this XFA only. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1580573002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h2
-rw-r--r--core/include/fxcrt/fx_basic.h64
2 files changed, 1 insertions, 65 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index bdddfc37d7..ad4f1f9a9a 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -545,7 +545,7 @@ class CPDF_Parser {
FX_DWORD m_dwXrefStartObjNum;
// A map of object numbers to indirect streams. Map owns the streams.
- CFX_MapPtrToPtr m_ObjectStreamMap;
+ std::map<FX_DWORD, std::unique_ptr<CPDF_StreamAcc>> m_ObjectStreamMap;
// Mapping of object numbers to offsets. The offsets are relative to the first
// object in the stream.
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 0635b0605d..6c4e6ad447 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -572,70 +572,6 @@ class CFX_FixedBufGrow {
DataType m_Data[FixedSize];
DataType* m_pData;
};
-class CFX_MapPtrToPtr {
- protected:
- struct CAssoc {
- CAssoc* pNext;
-
- void* key;
-
- void* value;
- };
-
- public:
- CFX_MapPtrToPtr(int nBlockSize = 10);
-
- ~CFX_MapPtrToPtr();
-
- int GetCount() const { return m_nCount; }
-
- FX_BOOL IsEmpty() const { return m_nCount == 0; }
-
- FX_BOOL Lookup(void* key, void*& rValue) const;
-
- void* GetValueAt(void* key) const;
-
- void*& operator[](void* key);
-
- void SetAt(void* key, void* newValue) { (*this)[key] = newValue; }
-
- FX_BOOL RemoveKey(void* key);
-
- void RemoveAll();
-
- FX_POSITION GetStartPosition() const {
- return (m_nCount == 0) ? NULL : (FX_POSITION)-1;
- }
-
- void GetNextAssoc(FX_POSITION& rNextPosition,
- void*& rKey,
- void*& rValue) const;
-
- FX_DWORD GetHashTableSize() const { return m_nHashTableSize; }
-
- void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow = TRUE);
-
- protected:
- CAssoc** m_pHashTable;
-
- FX_DWORD m_nHashTableSize;
-
- int m_nCount;
-
- CAssoc* m_pFreeList;
-
- struct CFX_Plex* m_pBlocks;
-
- int m_nBlockSize;
-
- FX_DWORD HashKey(void* key) const;
-
- CAssoc* NewAssoc();
-
- void FreeAssoc(CAssoc* pAssoc);
-
- CAssoc* GetAssocAt(void* key, FX_DWORD& hash) const;
-};
class CFX_PtrList {
protected: