summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/fgas_utils.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-03-13 13:06:05 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-13 17:26:01 +0000
commit6fcea1f851880b452bbaaeeeefefa48b49cab331 (patch)
tree88d4ad675466c98b5086efc8be69d981a02c5136 /xfa/fgas/crt/fgas_utils.h
parent8f03b422ed85180ac24fc76ba0fcf7de3556679f (diff)
downloadpdfium-6fcea1f851880b452bbaaeeeefefa48b49cab331.tar.xz
Convert TxtBreak line pieces to a vector.
This Cl converts the m_LinePieces array to a vector. This is the last usage of the CFX_BaseArrayTemplate so remove it and supporting code. Change-Id: I3f81e4fd1210f8d0347364a2e4e5bb42cd83cb30 Reviewed-on: https://pdfium-review.googlesource.com/2952 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/crt/fgas_utils.h')
-rw-r--r--xfa/fgas/crt/fgas_utils.h95
1 files changed, 0 insertions, 95 deletions
diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h
index 037528bd07..85f5e47310 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -9,101 +9,6 @@
#include "core/fxcrt/fx_coordinates.h"
-class FX_BASEARRAYDATA;
-
-class CFX_BaseArray {
- protected:
- CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize);
- ~CFX_BaseArray();
-
- int32_t GetSize() const;
- int32_t GetBlockSize() const;
- uint8_t* AddSpaceTo(int32_t index);
- uint8_t* GetAt(int32_t index) const;
- uint8_t* GetBuffer() const;
- int32_t Append(const CFX_BaseArray& src, int32_t iStart, int32_t iCount);
- int32_t Copy(const CFX_BaseArray& src, int32_t iStart, int32_t iCount);
- int32_t RemoveLast(int32_t iCount);
- void RemoveAll(bool bLeaveMemory);
-
- FX_BASEARRAYDATA* m_pData;
-};
-
-template <class baseType>
-class CFX_BaseArrayTemplate : public CFX_BaseArray {
- public:
- explicit CFX_BaseArrayTemplate(int32_t iGrowSize)
- : CFX_BaseArray(iGrowSize, sizeof(baseType)) {}
- CFX_BaseArrayTemplate(int32_t iGrowSize, int32_t iBlockSize)
- : CFX_BaseArray(iGrowSize, iBlockSize) {}
-
- int32_t GetSize() const { return CFX_BaseArray::GetSize(); }
- int32_t GetBlockSize() const { return CFX_BaseArray::GetBlockSize(); }
- baseType* AddSpace() {
- return (baseType*)CFX_BaseArray::AddSpaceTo(CFX_BaseArray::GetSize());
- }
- int32_t Add(const baseType& element) {
- int32_t index = CFX_BaseArray::GetSize();
- *(baseType*)CFX_BaseArray::AddSpaceTo(index) = element;
- return index;
- }
- baseType* GetBuffer() const { return (baseType*)CFX_BaseArray::GetBuffer(); }
- baseType& GetAt(int32_t index) const {
- return *(baseType*)CFX_BaseArray::GetAt(index);
- }
- baseType* GetPtrAt(int32_t index) const {
- return (baseType*)CFX_BaseArray::GetAt(index);
- }
- void SetAt(int32_t index, const baseType& element) {
- *(baseType*)CFX_BaseArray::GetAt(index) = element;
- }
- void SetAtGrow(int32_t index, const baseType& element) {
- *(baseType*)CFX_BaseArray::AddSpaceTo(index) = element;
- }
- int32_t Append(const CFX_BaseArrayTemplate& src,
- int32_t iStart,
- int32_t iCount) {
- return CFX_BaseArray::Append(src, iStart, iCount);
- }
- int32_t Copy(const CFX_BaseArrayTemplate& src,
- int32_t iStart,
- int32_t iCount) {
- return CFX_BaseArray::Copy(src, iStart, iCount);
- }
- int32_t RemoveLast(int32_t iCount) {
- return CFX_BaseArray::RemoveLast(iCount);
- }
- void RemoveAll(bool bLeaveMemory) { CFX_BaseArray::RemoveAll(bLeaveMemory); }
-};
-
-class CFX_BaseMassArrayImp {
- public:
- CFX_BaseMassArrayImp(int32_t iChunkSize, int32_t iBlockSize);
- ~CFX_BaseMassArrayImp();
-
- uint8_t* AddSpace() { return AddSpaceTo(m_iBlockCount); }
- uint8_t* AddSpaceTo(int32_t index);
- uint8_t* GetAt(int32_t index) const;
- int32_t Append(const CFX_BaseMassArrayImp& src,
- int32_t iStart,
- int32_t iCount);
- int32_t Copy(const CFX_BaseMassArrayImp& src, int32_t iStart, int32_t iCount);
- int32_t RemoveLast(int32_t iCount);
- void RemoveAll(bool bLeaveMemory);
-
- int32_t m_iChunkSize;
- int32_t m_iBlockSize;
- int32_t m_iChunkCount;
- int32_t m_iBlockCount;
- CFX_ArrayTemplate<void*>* m_pData;
-
- protected:
- void Append(int32_t iDstStart,
- const CFX_BaseMassArrayImp& src,
- int32_t iSrcStart,
- int32_t iSrcCount);
-};
-
class CFX_BaseDiscreteArray {
protected:
CFX_BaseDiscreteArray(int32_t iChunkSize, int32_t iBlockSize);