summaryrefslogtreecommitdiff
path: root/xfa/fgas
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-02 13:12:33 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-02 22:00:09 +0000
commit2079dce2ca47f3866f1dd5d51849c53362727f7b (patch)
tree5193f21bd1e94983134f2ce2b5a32a51edeef673 /xfa/fgas
parent281a51d6d4c13dd6fc479d8e01fa964cb148272c (diff)
downloadpdfium-2079dce2ca47f3866f1dd5d51849c53362727f7b.tar.xz
Remove unused CFX_ObjectStackTemplate
Change-Id: I9341f38cbea8c325e0d50f26987bc9e55e295630 Reviewed-on: https://pdfium-review.googlesource.com/2904 Commit-Queue: Tom Sepez <tsepez@chromium.org> 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.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h
index 18bc6fcd6e..105920dc55 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -170,61 +170,4 @@ class CFX_StackTemplate : public CFX_BaseStack {
void RemoveAll(bool bLeaveMemory) { CFX_BaseStack::RemoveAll(bLeaveMemory); }
};
-template <class baseType>
-class CFX_ObjectStackTemplate : public CFX_BaseStack {
- public:
- explicit CFX_ObjectStackTemplate(int32_t iChunkSize)
- : CFX_BaseStack(iChunkSize, sizeof(baseType)) {}
- ~CFX_ObjectStackTemplate() { RemoveAll(false); }
-
- int32_t Push(const baseType& element) {
- int32_t index = CFX_BaseStack::GetSize();
- baseType* p = (baseType*)CFX_BaseStack::Push();
- new ((void*)p) baseType(element);
- return index;
- }
- void Pop() {
- baseType* p = (baseType*)CFX_BaseStack::GetTopElement();
- if (p) {
- p->~baseType();
- }
- 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) {
- int32_t iSize = CFX_BaseStack::GetSize();
- for (int32_t i = 0; i < iSize; i++) {
- ((baseType*)CFX_BaseStack::GetAt(i))->~baseType();
- }
- CFX_BaseStack::RemoveAll(bLeaveMemory);
- }
- int32_t Copy(const CFX_ObjectStackTemplate& src,
- int32_t iStart,
- int32_t iCount) {
- if (iCount == 0) {
- return CFX_BaseStack::GetSize();
- }
- int32_t iSize = src.GetSize();
- ASSERT(iStart > -1 && iStart < iSize);
- if (iCount < 0) {
- iCount = iSize;
- }
- int32_t iEnd = iStart + iCount;
- if (iEnd > iSize) {
- iEnd = iSize;
- }
- RemoveAll(true);
- for (int32_t i = iStart; i < iEnd; i++) {
- Push(*src.GetAt(i));
- }
- return CFX_BaseStack::GetSize();
- }
-};
-
#endif // XFA_FGAS_CRT_FGAS_UTILS_H_