summaryrefslogtreecommitdiff
path: root/xfa/src/fgas
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fgas')
-rw-r--r--xfa/src/fgas/include/fx_mem.h2
-rw-r--r--xfa/src/fgas/include/fx_utl.h10
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.cpp8
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.h8
-rw-r--r--xfa/src/fgas/src/crt/fx_utils.cpp12
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.cpp8
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.h4
7 files changed, 25 insertions, 27 deletions
diff --git a/xfa/src/fgas/include/fx_mem.h b/xfa/src/fgas/include/fx_mem.h
index 265c582884..c8875e185d 100644
--- a/xfa/src/fgas/include/fx_mem.h
+++ b/xfa/src/fgas/include/fx_mem.h
@@ -51,8 +51,6 @@ public:
}
void operator delete(void *p, void *place) {}
};
-#define FXTARGET_New new
#define FXTARGET_NewWith(__allocator__) new(__allocator__)
-#define FXTARGET_Delete delete
#define FXTARGET_DeleteWith(__class__, __allocator__, pointer) {(pointer)->~__class__(); (pointer)->operator delete((pointer), (__allocator__));}
#endif
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h
index 38342a8cc8..2e4ad41842 100644
--- a/xfa/src/fgas/include/fx_utl.h
+++ b/xfa/src/fgas/include/fx_utl.h
@@ -132,7 +132,7 @@ public:
{
int32_t index = CFX_BaseArray::GetSize();
baseType *p = (baseType*)CFX_BaseArray::AddSpaceTo(index);
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p) baseType(element);
return index;
}
baseType& GetAt(int32_t index) const
@@ -194,7 +194,7 @@ public:
int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
for (int32_t i = iStart; i < iSize; i ++) {
- FXTARGET_New ((void*)pStart)baseType(src.GetAt(i));
+ new ((void*)pStart)baseType(src.GetAt(i));
pStart += iBlockSize;
}
return iCount;
@@ -312,7 +312,7 @@ public:
{
int32_t index = CFX_BaseMassArray::GetSize();
baseType *p = (baseType*)CFX_BaseMassArray::AddSpaceTo(index);
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p)baseType(element);
return index;
}
baseType& GetAt(int32_t index) const
@@ -483,7 +483,7 @@ public:
{
int32_t index = CFX_BaseStack::GetSize();
baseType *p = (baseType*)CFX_BaseStack::Push();
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p)baseType(element);
return index;
}
void Pop()
@@ -780,7 +780,7 @@ public:
if (pParent == NULL) {
pParent = &m_Root;
}
- CPLTreeNode *pChild = FXTARGET_New CPLTreeNode;
+ CPLTreeNode *pChild = new CPLTreeNode;
pChild->SetParentNode(pParent);
pChild->SetData(data);
if (pParent->m_pChildNode == NULL) {
diff --git a/xfa/src/fgas/src/crt/fx_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp
index 6d34a03e0c..69960e13ae 100644
--- a/xfa/src/fgas/src/crt/fx_memory.cpp
+++ b/xfa/src/fgas/src/crt/fx_memory.cpp
@@ -12,14 +12,14 @@ IFX_MEMAllocator* FX_CreateAllocator(FX_ALLOCTYPE eType, size_t chunkSize, size_
switch (eType) {
#ifndef _FXEMB
case FX_ALLOCTYPE_Dynamic:
- return FXTARGET_New CFX_DynamicStore(chunkSize);
+ return new CFX_DynamicStore(chunkSize);
#endif
case FX_ALLOCTYPE_Default:
- return FXTARGET_New CFX_DefStore();
+ return new CFX_DefStore();
case FX_ALLOCTYPE_Static:
- return FXTARGET_New CFX_StaticStore(chunkSize);
+ return new CFX_StaticStore(chunkSize);
case FX_ALLOCTYPE_Fixed:
- return FXTARGET_New CFX_FixedStore(blockSize, chunkSize);
+ return new CFX_FixedStore(blockSize, chunkSize);
default:
return NULL;
}
diff --git a/xfa/src/fgas/src/crt/fx_memory.h b/xfa/src/fgas/src/crt/fx_memory.h
index 9ce8d2f11c..eabfec559a 100644
--- a/xfa/src/fgas/src/crt/fx_memory.h
+++ b/xfa/src/fgas/src/crt/fx_memory.h
@@ -17,7 +17,7 @@ public:
~CFX_DefStore() {}
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size)
{
@@ -63,7 +63,7 @@ public:
~CFX_StaticStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock) {}
@@ -115,7 +115,7 @@ public:
virtual ~CFX_FixedStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock);
@@ -174,7 +174,7 @@ public:
virtual ~CFX_DynamicStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock);
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp
index 85f650b1d1..a4b18779b1 100644
--- a/xfa/src/fgas/src/crt/fx_utils.cpp
+++ b/xfa/src/fgas/src/crt/fx_utils.cpp
@@ -30,7 +30,7 @@ typedef FX_BASEARRAYDATA const * FX_LPCBASEARRAYDATA;
CFX_BaseArray::CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize)
{
FXSYS_assert(iGrowSize > 0 && iBlockSize > 0);
- m_pData = FXTARGET_New FX_BASEARRAYDATA;
+ m_pData = new FX_BASEARRAYDATA;
FX_memset(m_pData, 0, sizeof(FX_BASEARRAYDATA));
((FX_LPBASEARRAYDATA)m_pData)->iGrowSize = iGrowSize;
((FX_LPBASEARRAYDATA)m_pData)->iBlockSize = iBlockSize;
@@ -41,7 +41,7 @@ CFX_BaseArray::~CFX_BaseArray()
if (pData->pBuffer != NULL) {
FX_Free(pData->pBuffer);
}
- FXTARGET_Delete pData;
+ delete pData;
}
int32_t CFX_BaseArray::GetSize() const
{
@@ -306,11 +306,11 @@ void CFX_BaseMassArrayImp::RemoveAll(FX_BOOL bLeaveMemory)
}
CFX_BaseMassArray::CFX_BaseMassArray(int32_t iChunkSize, int32_t iBlockSize)
{
- m_pData = FXTARGET_New CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
+ m_pData = new CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
}
CFX_BaseMassArray::~CFX_BaseMassArray()
{
- FXTARGET_Delete m_pData;
+ delete m_pData;
}
int32_t CFX_BaseMassArray::GetSize() const
{
@@ -416,11 +416,11 @@ void CFX_BaseDiscreteArray::RemoveAll()
}
CFX_BaseStack::CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize)
{
- m_pData = FXTARGET_New CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
+ m_pData = new CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
}
CFX_BaseStack::~CFX_BaseStack()
{
- FXTARGET_Delete (CFX_BaseMassArrayImp*)m_pData;
+ delete (CFX_BaseMassArrayImp*)m_pData;
}
uint8_t* CFX_BaseStack::Push()
{
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp
index c9948cfa4f..e0ad4a9260 100644
--- a/xfa/src/fgas/src/font/fx_gefont.cpp
+++ b/xfa/src/fgas/src/font/fx_gefont.cpp
@@ -155,10 +155,10 @@ CFX_GEFont::~CFX_GEFont()
delete m_pFontEncoding;
}
if (m_pCharWidthMap != NULL) {
- FXTARGET_Delete m_pCharWidthMap;
+ delete m_pCharWidthMap;
}
if (m_pRectArray != NULL) {
- FXTARGET_Delete m_pRectArray;
+ delete m_pRectArray;
}
if (m_pBBoxMap != NULL) {
delete m_pBBoxMap;
@@ -339,10 +339,10 @@ void CFX_GEFont::InitFont()
#endif
}
if (m_pCharWidthMap == NULL) {
- m_pCharWidthMap = FXTARGET_New CFX_WordDiscreteArray(1024);
+ m_pCharWidthMap = new CFX_WordDiscreteArray(1024);
}
if (m_pRectArray == NULL) {
- m_pRectArray = FXTARGET_New CFX_RectMassArray(16);
+ m_pRectArray = new CFX_RectMassArray(16);
}
if (m_pBBoxMap == NULL) {
m_pBBoxMap = FX_NEW CFX_MapPtrToPtr(16);
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.h b/xfa/src/fgas/src/layout/fx_textbreak.h
index 13e79dae60..310be133c1 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.h
+++ b/xfa/src/fgas/src/layout/fx_textbreak.h
@@ -16,13 +16,13 @@ public:
, m_iArabicChars(0)
{
m_pLineChars = FX_NEW CFX_TxtCharArray;
- m_pLinePieces = FXTARGET_New CFX_TxtPieceArray(16);
+ m_pLinePieces = new CFX_TxtPieceArray(16);
}
~CFX_TxtLine()
{
RemoveAll();
delete m_pLineChars;
- FXTARGET_Delete m_pLinePieces;
+ delete m_pLinePieces;
}
int32_t CountChars() const
{