diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-01-25 15:39:02 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-01-25 15:39:02 -0800 |
commit | c64e4007ee4561ec2ed3ce986191caf9b024ef55 (patch) | |
tree | e28211b6207b9511526d25e39f3826ab206a4c8f /core/include | |
parent | 53cf01e2b67befbe371a4a56af3cf0d23f854009 (diff) | |
download | pdfium-c64e4007ee4561ec2ed3ce986191caf9b024ef55.tar.xz |
Remove CFX_SegmentedArray use from master.
Replace with std::deque.
Make member naming more consistent.
R=ochang@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1618273004 .
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/fxcrt/fx_basic.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 51bf8f7d65..9911b1cb45 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -480,71 +480,6 @@ class CFX_ObjectArray : public CFX_BasicArray { }; typedef CFX_ObjectArray<CFX_ByteString> CFX_ByteStringArray; typedef CFX_ObjectArray<CFX_WideString> CFX_WideStringArray; -class CFX_BaseSegmentedArray { - public: - CFX_BaseSegmentedArray(int unit_size = 1, - int segment_units = 512, - int index_size = 8); - - ~CFX_BaseSegmentedArray(); - - void SetUnitSize(int unit_size, int segment_units, int index_size = 8); - - void* Add(); - - void* GetAt(int index) const; - - void RemoveAll(); - - void Delete(int index, int count = 1); - - int GetSize() const { return m_DataSize; } - - int GetSegmentSize() const { return m_SegmentSize; } - - int GetUnitSize() const { return m_UnitSize; } - - void* Iterate(FX_BOOL (*callback)(void* param, void* pData), - void* param) const; - - private: - int m_UnitSize; - - short m_SegmentSize; - - uint8_t m_IndexSize; - - uint8_t m_IndexDepth; - - int m_DataSize; - - void* m_pIndex; - void** GetIndex(int seg_index) const; - void* IterateIndex(int level, - int& start, - void** pIndex, - FX_BOOL (*callback)(void* param, void* pData), - void* param) const; - void* IterateSegment(const uint8_t* pSegment, - int count, - FX_BOOL (*callback)(void* param, void* pData), - void* param) const; -}; -template <class ElementType> -class CFX_SegmentedArray : public CFX_BaseSegmentedArray { - public: - CFX_SegmentedArray(int segment_units, int index_size = 8) - : CFX_BaseSegmentedArray(sizeof(ElementType), segment_units, index_size) { - } - - void Add(ElementType data) { - *(ElementType*)CFX_BaseSegmentedArray::Add() = data; - } - - ElementType& operator[](int index) { - return *(ElementType*)CFX_BaseSegmentedArray::GetAt(index); - } -}; template <class DataType, int FixedSize> class CFX_FixedBufGrow { public: |