diff options
Diffstat (limited to 'xfa/src/fgas')
-rw-r--r-- | xfa/src/fgas/include/fx_utl.h | 5 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_utils.cpp | 30 |
2 files changed, 18 insertions, 17 deletions
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h index 3bb7b61986..354d4bf2bb 100644 --- a/xfa/src/fgas/include/fx_utl.h +++ b/xfa/src/fgas/include/fx_utl.h @@ -11,6 +11,7 @@ class CFX_BaseArray; template<class baseType> class CFX_BaseArrayTemplate;
template<class baseType> class CFX_ObjectBaseArrayTemplate;
class CFX_BaseMassArray;
+class CFX_BaseMassArrayImp;
template<class baseType> class CFX_MassArrayTemplate;
template<class baseType> class CFX_ObjectMassArrayTemplate;
class CFX_BaseDiscreteArray;
@@ -233,7 +234,7 @@ protected: FX_INT32 Copy(const CFX_BaseMassArray &src, FX_INT32 iStart = 0, FX_INT32 iCount = -1);
FX_INT32 RemoveLast(FX_INT32 iCount = -1);
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
- FX_LPVOID m_pData;
+ CFX_BaseMassArrayImp* m_pData;
};
template<class baseType>
class CFX_MassArrayTemplate : public CFX_BaseMassArray
@@ -431,7 +432,7 @@ protected: FX_INT32 GetSize() const;
FX_LPBYTE GetAt(FX_INT32 index) const;
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
- FX_LPVOID m_pData;
+ CFX_BaseMassArrayImp* m_pData;
};
template<class baseType>
class CFX_StackTemplate : public CFX_BaseStack
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp index f13af23216..0ee8152854 100644 --- a/xfa/src/fgas/src/crt/fx_utils.cpp +++ b/xfa/src/fgas/src/crt/fx_utils.cpp @@ -310,35 +310,35 @@ CFX_BaseMassArray::CFX_BaseMassArray(FX_INT32 iChunkSize, FX_INT32 iBlockSize) }
CFX_BaseMassArray::~CFX_BaseMassArray()
{
- FXTARGET_Delete (CFX_BaseMassArrayImp*)m_pData;
+ FXTARGET_Delete m_pData;
}
FX_INT32 CFX_BaseMassArray::GetSize() const
{
- return ((CFX_BaseMassArrayImp*)m_pData)->m_iBlockCount;
+ return m_pData->m_iBlockCount;
}
FX_LPBYTE CFX_BaseMassArray::AddSpaceTo(FX_INT32 index)
{
- return ((CFX_BaseMassArrayImp*)m_pData)->AddSpaceTo(index);
+ return m_pData->AddSpaceTo(index);
}
FX_LPBYTE CFX_BaseMassArray::GetAt(FX_INT32 index) const
{
- return ((CFX_BaseMassArrayImp*)m_pData)->GetAt(index);
+ return m_pData->GetAt(index);
}
FX_INT32 CFX_BaseMassArray::Append(const CFX_BaseMassArray &src, FX_INT32 iStart, FX_INT32 iCount)
{
- return ((CFX_BaseMassArrayImp*)m_pData)->Append(*(CFX_BaseMassArrayImp*)src.m_pData, iStart, iCount);
+ return m_pData->Append(*(CFX_BaseMassArrayImp*)src.m_pData, iStart, iCount);
}
FX_INT32 CFX_BaseMassArray::Copy(const CFX_BaseMassArray &src, FX_INT32 iStart, FX_INT32 iCount)
{
- return ((CFX_BaseMassArrayImp*)m_pData)->Copy(*(CFX_BaseMassArrayImp*)src.m_pData, iStart, iCount);
+ return m_pData->Copy(*(CFX_BaseMassArrayImp*)src.m_pData, iStart, iCount);
}
FX_INT32 CFX_BaseMassArray::RemoveLast(FX_INT32 iCount)
{
- return ((CFX_BaseMassArrayImp*)m_pData)->RemoveLast(iCount);
+ return m_pData->RemoveLast(iCount);
}
void CFX_BaseMassArray::RemoveAll(FX_BOOL bLeaveMemory)
{
- ((CFX_BaseMassArrayImp*)m_pData)->RemoveAll(bLeaveMemory);
+ m_pData->RemoveAll(bLeaveMemory);
}
typedef struct _FX_BASEDISCRETEARRAYDATA : public CFX_Object {
FX_INT32 iBlockSize;
@@ -424,11 +424,11 @@ CFX_BaseStack::~CFX_BaseStack() }
FX_LPBYTE CFX_BaseStack::Push()
{
- return ((CFX_BaseMassArrayImp*)m_pData)->AddSpace();
+ return m_pData->AddSpace();
}
void CFX_BaseStack::Pop()
{
- FX_INT32 &iBlockCount = ((CFX_BaseMassArrayImp*)m_pData)->m_iBlockCount;
+ FX_INT32 &iBlockCount = m_pData->m_iBlockCount;
if (iBlockCount < 1) {
return;
}
@@ -436,21 +436,21 @@ void CFX_BaseStack::Pop() }
FX_LPBYTE CFX_BaseStack::GetTopElement() const
{
- FX_INT32 iSize = ((CFX_BaseMassArrayImp*)m_pData)->m_iBlockCount;
+ FX_INT32 iSize = m_pData->m_iBlockCount;
if (iSize < 1) {
return NULL;
}
- return ((CFX_BaseMassArrayImp*)m_pData)->GetAt(iSize - 1);
+ return m_pData->GetAt(iSize - 1);
}
FX_INT32 CFX_BaseStack::GetSize() const
{
- return ((CFX_BaseMassArrayImp*)m_pData)->m_iBlockCount;
+ return m_pData->m_iBlockCount;
}
FX_LPBYTE CFX_BaseStack::GetAt(FX_INT32 index) const
{
- return ((CFX_BaseMassArrayImp*)m_pData)->GetAt(index);
+ return m_pData->GetAt(index);
}
void CFX_BaseStack::RemoveAll(FX_BOOL bLeaveMemory )
{
- ((CFX_BaseMassArrayImp*)m_pData)->RemoveAll(bLeaveMemory);
+ m_pData->RemoveAll(bLeaveMemory);
}
|