summaryrefslogtreecommitdiff
path: root/xfa/fgas
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-06 14:41:45 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-07 00:32:23 +0000
commitf9e67832df93d5a8df6546144e38ced023212d37 (patch)
tree2f7a3f9b74d5f316083e9a149ff187570fc4595a /xfa/fgas
parent312ce172c276089309214a027450241edb2aa399 (diff)
downloadpdfium-f9e67832df93d5a8df6546144e38ced023212d37.tar.xz
Remove CFX_StackTemplate now that all usage removed.
Change-Id: I5682af84f29bcd123e294e57998f50abcdadc894 Reviewed-on: https://pdfium-review.googlesource.com/2932 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas')
-rw-r--r--xfa/fgas/crt/fgas_utils.cpp32
-rw-r--r--xfa/fgas/crt/fgas_utils.h36
2 files changed, 0 insertions, 68 deletions
diff --git a/xfa/fgas/crt/fgas_utils.cpp b/xfa/fgas/crt/fgas_utils.cpp
index c09198f6e0..4f13d4872c 100644
--- a/xfa/fgas/crt/fgas_utils.cpp
+++ b/xfa/fgas/crt/fgas_utils.cpp
@@ -367,35 +367,3 @@ void CFX_BaseDiscreteArray::RemoveAll() {
ChunkBuffer.RemoveAll();
iChunkCount = 0;
}
-CFX_BaseStack::CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize) {
- m_pData = new CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
-}
-CFX_BaseStack::~CFX_BaseStack() {
- delete (CFX_BaseMassArrayImp*)m_pData;
-}
-uint8_t* CFX_BaseStack::Push() {
- return m_pData->AddSpace();
-}
-void CFX_BaseStack::Pop() {
- int32_t& iBlockCount = m_pData->m_iBlockCount;
- if (iBlockCount < 1) {
- return;
- }
- iBlockCount--;
-}
-uint8_t* CFX_BaseStack::GetTopElement() const {
- int32_t iSize = m_pData->m_iBlockCount;
- if (iSize < 1) {
- return nullptr;
- }
- return m_pData->GetAt(iSize - 1);
-}
-int32_t CFX_BaseStack::GetSize() const {
- return m_pData->m_iBlockCount;
-}
-uint8_t* CFX_BaseStack::GetAt(int32_t index) const {
- return m_pData->GetAt(index);
-}
-void CFX_BaseStack::RemoveAll(bool bLeaveMemory) {
- m_pData->RemoveAll(bLeaveMemory);
-}
diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h
index 105920dc55..037528bd07 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -134,40 +134,4 @@ class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray {
void RemoveAll() { CFX_BaseDiscreteArray::RemoveAll(); }
};
-class CFX_BaseStack {
- protected:
- CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize);
- ~CFX_BaseStack();
-
- uint8_t* Push();
- void Pop();
- uint8_t* GetTopElement() const;
- int32_t GetSize() const;
- uint8_t* GetAt(int32_t index) const;
- void RemoveAll(bool bLeaveMemory);
- CFX_BaseMassArrayImp* m_pData;
-};
-
-template <class baseType>
-class CFX_StackTemplate : public CFX_BaseStack {
- public:
- explicit CFX_StackTemplate(int32_t iChunkSize)
- : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
-
- int32_t Push(const baseType& element) {
- int32_t index = CFX_BaseStack::GetSize();
- *(baseType*)CFX_BaseStack::Push() = element;
- return index;
- }
- void Pop() { CFX_BaseStack::Pop(); }
- baseType* GetTopElement() const {
- return (baseType*)CFX_BaseStack::GetTopElement();
- }
- int32_t GetSize() const { return CFX_BaseStack::GetSize(); }
- baseType* GetAt(int32_t index) const {
- return (baseType*)CFX_BaseStack::GetAt(index);
- }
- void RemoveAll(bool bLeaveMemory) { CFX_BaseStack::RemoveAll(bLeaveMemory); }
-};
-
#endif // XFA_FGAS_CRT_FGAS_UTILS_H_