diff options
Diffstat (limited to 'xfa/fgas')
-rw-r--r-- | xfa/fgas/crt/fgas_algorithm.cpp | 8 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_algorithm.h | 2 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_codepage.cpp | 10 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_encode.cpp | 12 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_memory.cpp | 44 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_stream.cpp | 110 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_system.cpp | 8 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_utils.cpp | 56 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_utils.h | 14 | ||||
-rw-r--r-- | xfa/fgas/font/fgas_fontutils.cpp | 2 | ||||
-rw-r--r-- | xfa/fgas/font/fgas_gefont.cpp | 14 | ||||
-rw-r--r-- | xfa/fgas/font/fgas_stdfontmgr.cpp | 16 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_rtfbreak.cpp | 26 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_rtfbreak.h | 18 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.cpp | 16 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.h | 10 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_unicode.cpp | 4 | ||||
-rw-r--r-- | xfa/fgas/localization/fgas_datetime.cpp | 26 | ||||
-rw-r--r-- | xfa/fgas/localization/fgas_locale.cpp | 6 | ||||
-rw-r--r-- | xfa/fgas/xml/fgas_sax_imp.cpp | 20 |
20 files changed, 211 insertions, 211 deletions
diff --git a/xfa/fgas/crt/fgas_algorithm.cpp b/xfa/fgas/crt/fgas_algorithm.cpp index ce8dda646a..ee557b10d9 100644 --- a/xfa/fgas/crt/fgas_algorithm.cpp +++ b/xfa/fgas/crt/fgas_algorithm.cpp @@ -55,7 +55,7 @@ static void FX_Base64EncodePiece(const FX_BASE64DATA& src, } } int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } @@ -118,7 +118,7 @@ static void FX_Base64DecodePiece(const FX_CHAR src[4], int32_t iChars, FX_BASE64DATA& dst, int32_t& iBytes) { - FXSYS_assert(iChars > 0 && iChars < 5); + ASSERT(iChars > 0 && iChars < 5); iBytes = 1; dst.data2 = g_FXBase64DecoderMap[(uint8_t)src[0]]; if (iChars > 1) { @@ -144,7 +144,7 @@ static void FX_Base64DecodePiece(const FX_CHAR src[4], } } int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } @@ -200,7 +200,7 @@ int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { return pDstEnd - pDst; } int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) { - FXSYS_assert(pSrc != NULL); + ASSERT(pSrc != NULL); if (iSrcLen < 1) { return 0; } diff --git a/xfa/fgas/crt/fgas_algorithm.h b/xfa/fgas/crt/fgas_algorithm.h index 94a0d06f9e..9fefb2bc40 100644 --- a/xfa/fgas/crt/fgas_algorithm.h +++ b/xfa/fgas/crt/fgas_algorithm.h @@ -31,7 +31,7 @@ template <class baseType> class CFX_DSPATemplate { public: int32_t Lookup(const baseType& find, const baseType* pArray, int32_t iCount) { - FXSYS_assert(pArray != NULL); + ASSERT(pArray != NULL); if (iCount < 1) { return -1; } diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp index 36c40a6469..7362a89d30 100644 --- a/xfa/fgas/crt/fgas_codepage.cpp +++ b/xfa/fgas/crt/fgas_codepage.cpp @@ -19,7 +19,7 @@ static const FX_CHARSET_MAP g_FXCharset2CodePageTable[] = { }; uint16_t FX_GetCodePageFromCharset(uint8_t charset) { int32_t iEnd = sizeof(g_FXCharset2CodePageTable) / sizeof(FX_CHARSET_MAP) - 1; - FXSYS_assert(iEnd >= 0); + ASSERT(iEnd >= 0); int32_t iStart = 0, iMid; do { iMid = (iStart + iEnd) / 2; @@ -45,7 +45,7 @@ static const FX_CHARSET_MAP g_FXCodepage2CharsetTable[] = { }; uint16_t FX_GetCharsetFromCodePage(uint16_t codepage) { int32_t iEnd = sizeof(g_FXCodepage2CharsetTable) / sizeof(FX_CHARSET_MAP) - 1; - FXSYS_assert(iEnd >= 0); + ASSERT(iEnd >= 0); int32_t iStart = 0, iMid; do { iMid = (iStart + iEnd) / 2; @@ -199,7 +199,7 @@ const FX_LANG2CPMAP g_FXLang2CodepageTable[] = { }; uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage) { int32_t iEnd = sizeof(g_FXLang2CodepageTable) / sizeof(FX_LANG2CPMAP) - 1; - FXSYS_assert(iEnd >= 0); + ASSERT(iEnd >= 0); int32_t iStart = 0, iMid; do { iMid = (iStart + iEnd) / 2; @@ -302,7 +302,7 @@ static const FX_STR2CPHASH g_FXCPHashTable[] = { {0xf637e157, 0x478}, {0xfc213f3a, 0x2717}, {0xff654d14, 0x3b5}, }; uint16_t FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) { - FXSYS_assert(pStr != NULL); + ASSERT(pStr != NULL); if (iLength < 0) { iLength = FXSYS_strlen(pStr); } @@ -312,7 +312,7 @@ uint16_t FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) { uint32_t uHash = FX_HashCode_GetA(CFX_ByteStringC(pStr, iLength), true); int32_t iStart = 0; int32_t iEnd = sizeof(g_FXCPHashTable) / sizeof(FX_STR2CPHASH) - 1; - FXSYS_assert(iEnd >= 0); + ASSERT(iEnd >= 0); do { int32_t iMid = (iStart + iEnd) / 2; const FX_STR2CPHASH& cp = g_FXCPHashTable[iMid]; diff --git a/xfa/fgas/crt/fgas_encode.cpp b/xfa/fgas/crt/fgas_encode.cpp index 84a1ef40ed..b84406f642 100644 --- a/xfa/fgas/crt/fgas_encode.cpp +++ b/xfa/fgas/crt/fgas_encode.cpp @@ -7,7 +7,7 @@ #include "xfa/fgas/crt/fgas_codepage.h" void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) { - FXSYS_assert(pStr != NULL); + ASSERT(pStr != NULL); if (iLength < 0) { iLength = FXSYS_wcslen(pStr); } @@ -30,7 +30,7 @@ void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) { void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, FX_WCHAR* pDst, int32_t iLength) { - FXSYS_assert(pSrc != NULL && pDst != NULL); + ASSERT(pSrc != NULL && pDst != NULL); if (iLength < 0) { iLength = FXSYS_wcslen(pSrc); } @@ -51,7 +51,7 @@ void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, } } void FX_UTF16ToWChar(void* pBuffer, int32_t iLength) { - FXSYS_assert(pBuffer != NULL && iLength > 0); + ASSERT(pBuffer != NULL && iLength > 0); if (sizeof(FX_WCHAR) == 2) { return; } @@ -64,7 +64,7 @@ void FX_UTF16ToWChar(void* pBuffer, int32_t iLength) { void FX_UTF16ToWCharCopy(const uint16_t* pUTF16, FX_WCHAR* pWChar, int32_t iLength) { - FXSYS_assert(pUTF16 != NULL && pWChar != NULL && iLength > 0); + ASSERT(pUTF16 != NULL && pWChar != NULL && iLength > 0); if (sizeof(FX_WCHAR) == 2) { FXSYS_memcpy(pWChar, pUTF16, iLength * sizeof(FX_WCHAR)); } else { @@ -74,7 +74,7 @@ void FX_UTF16ToWCharCopy(const uint16_t* pUTF16, } } void FX_WCharToUTF16(void* pBuffer, int32_t iLength) { - FXSYS_assert(pBuffer != NULL && iLength > 0); + ASSERT(pBuffer != NULL && iLength > 0); if (sizeof(FX_WCHAR) == 2) { return; } @@ -87,7 +87,7 @@ void FX_WCharToUTF16(void* pBuffer, int32_t iLength) { void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, uint16_t* pUTF16, int32_t iLength) { - FXSYS_assert(pWChar != NULL && pUTF16 != NULL && iLength > 0); + ASSERT(pWChar != NULL && pUTF16 != NULL && iLength > 0); if (sizeof(FX_WCHAR) == 2) { FXSYS_memcpy(pUTF16, pWChar, iLength * sizeof(FX_WCHAR)); } else { diff --git a/xfa/fgas/crt/fgas_memory.cpp b/xfa/fgas/crt/fgas_memory.cpp index 7eda5b9ba6..4334789cb7 100644 --- a/xfa/fgas/crt/fgas_memory.cpp +++ b/xfa/fgas/crt/fgas_memory.cpp @@ -159,7 +159,7 @@ CFX_StaticStore::CFX_StaticStore(size_t iDefChunkSize) m_iDefChunkSize(iDefChunkSize), m_pChunk(NULL), m_pLastChunk(NULL) { - FXSYS_assert(m_iDefChunkSize != 0); + ASSERT(m_iDefChunkSize != 0); } CFX_StaticStore::~CFX_StaticStore() { FX_STATICSTORECHUNK* pChunk = m_pChunk; @@ -170,7 +170,7 @@ CFX_StaticStore::~CFX_StaticStore() { } } FX_STATICSTORECHUNK* CFX_StaticStore::AllocChunk(size_t size) { - FXSYS_assert(size != 0); + ASSERT(size != 0); FX_STATICSTORECHUNK* pChunk = (FX_STATICSTORECHUNK*)FX_Alloc( uint8_t, sizeof(FX_STATICSTORECHUNK) + size); pChunk->iChunkSize = size; @@ -185,7 +185,7 @@ FX_STATICSTORECHUNK* CFX_StaticStore::AllocChunk(size_t size) { return pChunk; } FX_STATICSTORECHUNK* CFX_StaticStore::FindChunk(size_t size) { - FXSYS_assert(size != 0); + ASSERT(size != 0); if (m_pLastChunk == NULL || m_pLastChunk->iFreeSize < size) { return AllocChunk(std::max(m_iDefChunkSize, size)); } @@ -193,9 +193,9 @@ FX_STATICSTORECHUNK* CFX_StaticStore::FindChunk(size_t size) { } void* CFX_StaticStore::Alloc(size_t size) { size = FX_4BYTEALIGN(size); - FXSYS_assert(size != 0); + ASSERT(size != 0); FX_STATICSTORECHUNK* pChunk = FindChunk(size); - FXSYS_assert(pChunk->iFreeSize >= size); + ASSERT(pChunk->iFreeSize >= size); uint8_t* p = (uint8_t*)pChunk; p += sizeof(FX_STATICSTORECHUNK) + pChunk->iChunkSize - pChunk->iFreeSize; pChunk->iFreeSize -= size; @@ -203,7 +203,7 @@ void* CFX_StaticStore::Alloc(size_t size) { return p; } size_t CFX_StaticStore::SetDefChunkSize(size_t size) { - FXSYS_assert(size != 0); + ASSERT(size != 0); size_t v = m_iDefChunkSize; m_iDefChunkSize = size; return v; @@ -212,7 +212,7 @@ CFX_FixedStore::CFX_FixedStore(size_t iBlockSize, size_t iBlockNumsInChunk) : m_iBlockSize(FX_4BYTEALIGN(iBlockSize)), m_iDefChunkSize(FX_4BYTEALIGN(iBlockNumsInChunk)), m_pChunk(NULL) { - FXSYS_assert(m_iBlockSize != 0 && m_iDefChunkSize != 0); + ASSERT(m_iBlockSize != 0 && m_iDefChunkSize != 0); } CFX_FixedStore::~CFX_FixedStore() { FX_FIXEDSTORECHUNK* pChunk = m_pChunk; @@ -251,20 +251,20 @@ void* CFX_FixedStore::Alloc(size_t size) { if (pChunk == NULL) { pChunk = AllocChunk(); } - FXSYS_assert(pChunk != NULL); + ASSERT(pChunk != NULL); uint8_t* pFlags = pChunk->FirstFlag(); size_t i = 0; for (; i < pChunk->iChunkSize; i++) if (pFlags[i] == 0) { break; } - FXSYS_assert(i < pChunk->iChunkSize); + ASSERT(i < pChunk->iChunkSize); pFlags[i] = 1; pChunk->iFreeNum--; return pChunk->FirstBlock() + i * m_iBlockSize; } void CFX_FixedStore::Free(void* pBlock) { - FXSYS_assert(pBlock != NULL); + ASSERT(pBlock != NULL); FX_FIXEDSTORECHUNK* pPrior = NULL; FX_FIXEDSTORECHUNK* pChunk = m_pChunk; uint8_t* pStart = NULL; @@ -279,9 +279,9 @@ void CFX_FixedStore::Free(void* pBlock) { } pPrior = pChunk, pChunk = pChunk->pNextChunk; } - FXSYS_assert(pChunk != NULL); + ASSERT(pChunk != NULL); size_t iPos = ((uint8_t*)pBlock - pStart) / m_iBlockSize; - FXSYS_assert(iPos < pChunk->iChunkSize); + ASSERT(iPos < pChunk->iChunkSize); uint8_t* pFlags = pChunk->FirstFlag(); if (pFlags[iPos] == 0) { return; @@ -298,14 +298,14 @@ void CFX_FixedStore::Free(void* pBlock) { } } size_t CFX_FixedStore::SetDefChunkSize(size_t iChunkSize) { - FXSYS_assert(iChunkSize != 0); + ASSERT(iChunkSize != 0); size_t v = m_iDefChunkSize; m_iDefChunkSize = FX_4BYTEALIGN(iChunkSize); return v; } CFX_DynamicStore::CFX_DynamicStore(size_t iDefChunkSize) : m_iDefChunkSize(iDefChunkSize), m_pChunk(NULL) { - FXSYS_assert(m_iDefChunkSize != 0); + ASSERT(m_iDefChunkSize != 0); } CFX_DynamicStore::~CFX_DynamicStore() { FX_DYNAMICSTORECHUNK* pChunk = m_pChunk; @@ -316,7 +316,7 @@ CFX_DynamicStore::~CFX_DynamicStore() { } } FX_DYNAMICSTORECHUNK* CFX_DynamicStore::AllocChunk(size_t size) { - FXSYS_assert(size != 0); + ASSERT(size != 0); FX_DYNAMICSTORECHUNK* pChunk = (FX_DYNAMICSTORECHUNK*)FX_Alloc( uint8_t, sizeof(FX_DYNAMICSTORECHUNK) + sizeof(FX_DYNAMICSTOREBLOCK) * 2 + size); @@ -346,7 +346,7 @@ FX_DYNAMICSTORECHUNK* CFX_DynamicStore::AllocChunk(size_t size) { } void* CFX_DynamicStore::Alloc(size_t size) { size = FX_4BYTEALIGN(size); - FXSYS_assert(size != 0); + ASSERT(size != 0); FX_DYNAMICSTORECHUNK* pChunk = m_pChunk; FX_DYNAMICSTOREBLOCK* pBlock = NULL; while (pChunk != NULL) { @@ -370,7 +370,7 @@ void* CFX_DynamicStore::Alloc(size_t size) { pChunk = AllocChunk(std::max(m_iDefChunkSize, size)); pBlock = pChunk->FirstBlock(); } - FXSYS_assert(pChunk != NULL && pBlock != NULL); + ASSERT(pChunk != NULL && pBlock != NULL); size_t m = size + sizeof(FX_DYNAMICSTOREBLOCK); pBlock->bUsed = TRUE; if (pBlock->iBlockSize > m) { @@ -386,7 +386,7 @@ void* CFX_DynamicStore::Alloc(size_t size) { return pBlock->Data(); } void CFX_DynamicStore::Free(void* pBlock) { - FXSYS_assert(pBlock != NULL); + ASSERT(pBlock != NULL); FX_DYNAMICSTORECHUNK* pPriorChunk = NULL; FX_DYNAMICSTORECHUNK* pChunk = m_pChunk; while (pChunk != NULL) { @@ -397,7 +397,7 @@ void CFX_DynamicStore::Free(void* pBlock) { } pPriorChunk = pChunk, pChunk = pChunk->pNextChunk; } - FXSYS_assert(pChunk != NULL); + ASSERT(pChunk != NULL); FX_DYNAMICSTOREBLOCK* pPriorBlock = NULL; FX_DYNAMICSTOREBLOCK* pFindBlock = pChunk->FirstBlock(); while (pFindBlock->iBlockSize != 0) { @@ -407,8 +407,8 @@ void CFX_DynamicStore::Free(void* pBlock) { pPriorBlock = pFindBlock; pFindBlock = pFindBlock->NextBlock(); } - FXSYS_assert(pFindBlock->iBlockSize != 0 && pFindBlock->bUsed && - pBlock == (void*)pFindBlock->Data()); + ASSERT(pFindBlock->iBlockSize != 0 && pFindBlock->bUsed && + pBlock == (void*)pFindBlock->Data()); pFindBlock->bUsed = FALSE; pChunk->iFreeSize += pFindBlock->iBlockSize; if (pPriorBlock == NULL) { @@ -439,7 +439,7 @@ void CFX_DynamicStore::Free(void* pBlock) { } } size_t CFX_DynamicStore::SetDefChunkSize(size_t size) { - FXSYS_assert(size != 0); + ASSERT(size != 0); size_t v = m_iDefChunkSize; m_iDefChunkSize = size; return v; diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp index 7ee76fa4b4..c05e81ade3 100644 --- a/xfa/fgas/crt/fgas_stream.cpp +++ b/xfa/fgas/crt/fgas_stream.cpp @@ -384,8 +384,8 @@ CFX_FileStreamImp::~CFX_FileStreamImp() { } FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess) { - FXSYS_assert(m_hFile == NULL); - FXSYS_assert(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0); + ASSERT(m_hFile == NULL); + ASSERT(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0); #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \ _FX_OS_ == _FX_WIN64_ const FX_WCHAR* wsMode; @@ -461,32 +461,32 @@ FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName, return TRUE; } int32_t CFX_FileStreamImp::GetLength() const { - FXSYS_assert(m_hFile != NULL); + ASSERT(m_hFile != NULL); return m_iLength; } int32_t CFX_FileStreamImp::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) { - FXSYS_assert(m_hFile != NULL); + ASSERT(m_hFile != NULL); FXSYS_fseek(m_hFile, iOffset, eSeek); return FXSYS_ftell(m_hFile); } int32_t CFX_FileStreamImp::GetPosition() { - FXSYS_assert(m_hFile != NULL); + ASSERT(m_hFile != NULL); return FXSYS_ftell(m_hFile); } FX_BOOL CFX_FileStreamImp::IsEOF() const { - FXSYS_assert(m_hFile != NULL); + ASSERT(m_hFile != NULL); return FXSYS_ftell(m_hFile) >= m_iLength; } int32_t CFX_FileStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_hFile != NULL); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_hFile != NULL); + ASSERT(pBuffer != NULL && iBufferSize > 0); return FXSYS_fread(pBuffer, 1, iBufferSize, m_hFile); } int32_t CFX_FileStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS) { - FXSYS_assert(m_hFile != NULL); - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(m_hFile != NULL); + ASSERT(pStr != NULL && iMaxLength > 0); if (m_iLength <= 0) { return 0; } @@ -509,8 +509,8 @@ int32_t CFX_FileStreamImp::ReadString(FX_WCHAR* pStr, } int32_t CFX_FileStreamImp::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(pBuffer != NULL && iBufferSize > 0); int32_t iRet = FXSYS_fwrite(pBuffer, 1, iBufferSize, m_hFile); if (iRet != 0) { int32_t iPos = FXSYS_ftell(m_hFile); @@ -521,8 +521,8 @@ int32_t CFX_FileStreamImp::WriteData(const uint8_t* pBuffer, return iRet; } int32_t CFX_FileStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength) { - FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); - FXSYS_assert(pStr != NULL && iLength > 0); + ASSERT(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(pStr != NULL && iLength > 0); int32_t iRet = FXSYS_fwrite(pStr, 2, iLength, m_hFile); if (iRet != 0) { int32_t iPos = FXSYS_ftell(m_hFile); @@ -533,11 +533,11 @@ int32_t CFX_FileStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength) { return iRet; } void CFX_FileStreamImp::Flush() { - FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); FXSYS_fflush(m_hFile); } FX_BOOL CFX_FileStreamImp::SetLength(int32_t iLength) { - FXSYS_assert(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(m_hFile != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); FX_BOOL bRet = FX_fsetsize(m_hFile, iLength); m_iLength = FX_filelength(m_hFile); return bRet; @@ -546,7 +546,7 @@ CFX_FileReadStreamImp::CFX_FileReadStreamImp() : m_pFileRead(NULL), m_iPosition(0), m_iLength(0) {} FX_BOOL CFX_FileReadStreamImp::LoadFileRead(IFX_FileRead* pFileRead, uint32_t dwAccess) { - FXSYS_assert(m_pFileRead == NULL && pFileRead != NULL); + ASSERT(m_pFileRead == NULL && pFileRead != NULL); if (dwAccess & FX_STREAMACCESS_Write) { return FALSE; } @@ -580,8 +580,8 @@ FX_BOOL CFX_FileReadStreamImp::IsEOF() const { return m_iPosition >= m_iLength; } int32_t CFX_FileReadStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_pFileRead != NULL); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_pFileRead != NULL); + ASSERT(pBuffer != NULL && iBufferSize > 0); if (iBufferSize > m_iLength - m_iPosition) { iBufferSize = m_iLength - m_iPosition; } @@ -594,8 +594,8 @@ int32_t CFX_FileReadStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { int32_t CFX_FileReadStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS) { - FXSYS_assert(m_pFileRead != NULL); - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(m_pFileRead != NULL); + ASSERT(pStr != NULL && iMaxLength > 0); iMaxLength = ReadData((uint8_t*)pStr, iMaxLength * 2) / 2; if (iMaxLength <= 0) { return 0; @@ -621,7 +621,7 @@ FX_BOOL CFX_BufferReadStreamImp::LoadBufferRead(IFX_BufferRead* pBufferRead, int32_t iFileSize, uint32_t dwAccess, FX_BOOL bReleaseBufferRead) { - FXSYS_assert(m_pBufferRead == NULL && pBufferRead != NULL); + ASSERT(m_pBufferRead == NULL && pBufferRead != NULL); if (dwAccess & FX_STREAMACCESS_Write) { return FALSE; } @@ -669,8 +669,8 @@ FX_BOOL CFX_BufferReadStreamImp::IsEOF() const { } int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_pBufferRead != NULL); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_pBufferRead != NULL); + ASSERT(pBuffer != NULL && iBufferSize > 0); int32_t iLength = GetLength(); if (m_iPosition >= iLength) { return 0; @@ -724,8 +724,8 @@ int32_t CFX_BufferReadStreamImp::ReadData(uint8_t* pBuffer, int32_t CFX_BufferReadStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS) { - FXSYS_assert(m_pBufferRead != NULL); - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(m_pBufferRead != NULL); + ASSERT(pStr != NULL && iMaxLength > 0); iMaxLength = ReadData((uint8_t*)pStr, iMaxLength * 2) / 2; if (iMaxLength <= 0) { return 0; @@ -741,7 +741,7 @@ CFX_FileWriteStreamImp::CFX_FileWriteStreamImp() : m_pFileWrite(NULL), m_iPosition(0) {} FX_BOOL CFX_FileWriteStreamImp::LoadFileWrite(IFX_FileWrite* pFileWrite, uint32_t dwAccess) { - FXSYS_assert(m_pFileWrite == NULL && pFileWrite != NULL); + ASSERT(m_pFileWrite == NULL && pFileWrite != NULL); if (dwAccess & FX_STREAMACCESS_Read) { return FALSE; } @@ -808,8 +808,8 @@ CFX_BufferStreamImp::CFX_BufferStreamImp() FX_BOOL CFX_BufferStreamImp::LoadBuffer(uint8_t* pData, int32_t iTotalSize, uint32_t dwAccess) { - FXSYS_assert(m_pData == NULL); - FXSYS_assert(pData != NULL && iTotalSize > 0); + ASSERT(m_pData == NULL); + ASSERT(pData != NULL && iTotalSize > 0); m_dwAccess = dwAccess; m_pData = pData; m_iTotalSize = iTotalSize; @@ -818,11 +818,11 @@ FX_BOOL CFX_BufferStreamImp::LoadBuffer(uint8_t* pData, return TRUE; } int32_t CFX_BufferStreamImp::GetLength() const { - FXSYS_assert(m_pData != NULL); + ASSERT(m_pData != NULL); return m_iLength; } int32_t CFX_BufferStreamImp::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) { - FXSYS_assert(m_pData != NULL); + ASSERT(m_pData != NULL); if (eSeek == FX_STREAMSEEK_Begin) { m_iPosition = iOffset; } else if (eSeek == FX_STREAMSEEK_Current) { @@ -839,16 +839,16 @@ int32_t CFX_BufferStreamImp::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) { return m_iPosition; } int32_t CFX_BufferStreamImp::GetPosition() { - FXSYS_assert(m_pData != NULL); + ASSERT(m_pData != NULL); return m_iPosition; } FX_BOOL CFX_BufferStreamImp::IsEOF() const { - FXSYS_assert(m_pData != NULL); + ASSERT(m_pData != NULL); return m_iPosition >= m_iLength; } int32_t CFX_BufferStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_pData != NULL); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_pData != NULL); + ASSERT(pBuffer != NULL && iBufferSize > 0); int32_t iLen = std::min(m_iLength - m_iPosition, iBufferSize); if (iLen <= 0) { return 0; @@ -860,8 +860,8 @@ int32_t CFX_BufferStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { int32_t CFX_BufferStreamImp::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS) { - FXSYS_assert(m_pData != NULL); - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(m_pData != NULL); + ASSERT(pStr != NULL && iMaxLength > 0); int32_t iLen = std::min((m_iLength - m_iPosition) / 2, iMaxLength); if (iLen <= 0) { return 0; @@ -878,8 +878,8 @@ int32_t CFX_BufferStreamImp::ReadString(FX_WCHAR* pStr, } int32_t CFX_BufferStreamImp::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(pBuffer != NULL && iBufferSize > 0); int32_t iLen = std::min(m_iTotalSize - m_iPosition, iBufferSize); if (iLen <= 0) { return 0; @@ -893,8 +893,8 @@ int32_t CFX_BufferStreamImp::WriteData(const uint8_t* pBuffer, } int32_t CFX_BufferStreamImp::WriteString(const FX_WCHAR* pStr, int32_t iLength) { - FXSYS_assert(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); - FXSYS_assert(pStr != NULL && iLength > 0); + ASSERT(m_pData != NULL && (m_dwAccess & FX_STREAMACCESS_Write) != 0); + ASSERT(pStr != NULL && iLength > 0); int32_t iLen = std::min((m_iTotalSize - m_iPosition) / 2, iLength); if (iLen <= 0) { return 0; @@ -908,7 +908,7 @@ int32_t CFX_BufferStreamImp::WriteString(const FX_WCHAR* pStr, } IFX_Stream* IFX_Stream::CreateTextStream(IFX_Stream* pBaseStream, FX_BOOL bDeleteOnRelease) { - FXSYS_assert(pBaseStream != NULL); + ASSERT(pBaseStream != NULL); return new CFX_TextStream(pBaseStream, bDeleteOnRelease); } CFX_TextStream::CFX_TextStream(IFX_Stream* pStream, FX_BOOL bDelStream) @@ -920,7 +920,7 @@ CFX_TextStream::CFX_TextStream(IFX_Stream* pStream, FX_BOOL bDelStream) m_bDelStream(bDelStream), m_pStreamImp(pStream), m_iRefCount(1) { - FXSYS_assert(m_pStreamImp != NULL); + ASSERT(m_pStreamImp != NULL); m_pStreamImp->Retain(); InitStream(); } @@ -1049,7 +1049,7 @@ int32_t CFX_TextStream::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS, int32_t const* pByteSize) { - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(pStr != NULL && iMaxLength > 0); if (m_pStreamImp == NULL) { return -1; } @@ -1099,7 +1099,7 @@ int32_t CFX_TextStream::ReadString(FX_WCHAR* pStr, return iMaxLength; } int32_t CFX_TextStream::WriteString(const FX_WCHAR* pStr, int32_t iLength) { - FXSYS_assert(pStr != NULL && iLength > 0); + ASSERT(pStr != NULL && iLength > 0); if ((m_pStreamImp->GetAccessModes() & FX_STREAMACCESS_Write) == 0) { return -1; } @@ -1302,7 +1302,7 @@ FX_BOOL CFX_Stream::IsEOF() const { return m_iPosition >= m_iStart + m_iLength; } int32_t CFX_Stream::ReadData(uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(pBuffer != NULL && iBufferSize > 0); if (m_pStreamImp == NULL) { return -1; } @@ -1321,7 +1321,7 @@ int32_t CFX_Stream::ReadString(FX_WCHAR* pStr, int32_t iMaxLength, FX_BOOL& bEOS, int32_t const* pByteSize) { - FXSYS_assert(pStr != NULL && iMaxLength > 0); + ASSERT(pStr != NULL && iMaxLength > 0); if (m_pStreamImp == NULL) { return -1; } @@ -1346,7 +1346,7 @@ int32_t CFX_Stream::ReadString(FX_WCHAR* pStr, } int32_t CFX_Stream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) { - FXSYS_assert(pBuffer != NULL && iBufferSize > 0); + ASSERT(pBuffer != NULL && iBufferSize > 0); if (m_pStreamImp == NULL) { return -1; } @@ -1372,7 +1372,7 @@ int32_t CFX_Stream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) { return iLen; } int32_t CFX_Stream::WriteString(const FX_WCHAR* pStr, int32_t iLength) { - FXSYS_assert(pStr != NULL && iLength > 0); + ASSERT(pStr != NULL && iLength > 0); if (m_pStreamImp == NULL) { return -1; } @@ -1438,7 +1438,7 @@ uint16_t CFX_Stream::SetCodePage(uint16_t wCodePage) { IFX_Stream* CFX_Stream::CreateSharedStream(uint32_t dwAccess, int32_t iOffset, int32_t iLength) { - FXSYS_assert(iLength > 0); + ASSERT(iLength > 0); if (m_pStreamImp == NULL) { return NULL; } @@ -1474,12 +1474,12 @@ IFX_Stream* CFX_Stream::CreateSharedStream(uint32_t dwAccess, } IFX_FileRead* FX_CreateFileRead(IFX_Stream* pBaseStream, FX_BOOL bReleaseStream) { - FXSYS_assert(pBaseStream != NULL); + ASSERT(pBaseStream != NULL); return new CFGAS_FileRead(pBaseStream, bReleaseStream); } CFGAS_FileRead::CFGAS_FileRead(IFX_Stream* pStream, FX_BOOL bReleaseStream) : m_bReleaseStream(bReleaseStream), m_pStream(pStream) { - FXSYS_assert(m_pStream != NULL); + ASSERT(m_pStream != NULL); } CFGAS_FileRead::~CFGAS_FileRead() { if (m_bReleaseStream) { @@ -1511,7 +1511,7 @@ CFX_BufferAccImp::CFX_BufferAccImp(IFX_BufferRead* pBufferRead, : m_pBufferRead(pBufferRead), m_bReleaseStream(bReleaseStream), m_iBufSize(iFileSize) { - FXSYS_assert(m_pBufferRead); + ASSERT(m_pBufferRead); } CFX_BufferAccImp::~CFX_BufferAccImp() { if (m_bReleaseStream && m_pBufferRead) { @@ -1593,13 +1593,13 @@ FX_BOOL CFX_BufferAccImp::ReadBlock(void* buffer, IFX_FileWrite* FX_CreateFileWrite(IFX_Stream* pBaseStream, FX_BOOL bReleaseStream) { - FXSYS_assert(pBaseStream != NULL); + ASSERT(pBaseStream != NULL); return new CFGAS_FileWrite(pBaseStream, bReleaseStream); } CFGAS_FileWrite::CFGAS_FileWrite(IFX_Stream* pStream, FX_BOOL bReleaseStream) : m_pStream(pStream), m_bReleaseStream(bReleaseStream) { - FXSYS_assert(m_pStream != NULL); + ASSERT(m_pStream != NULL); } CFGAS_FileWrite::~CFGAS_FileWrite() { if (m_bReleaseStream) { diff --git a/xfa/fgas/crt/fgas_system.cpp b/xfa/fgas/crt/fgas_system.cpp index 7ba2d924ca..3ab39268ef 100644 --- a/xfa/fgas/crt/fgas_system.cpp +++ b/xfa/fgas/crt/fgas_system.cpp @@ -30,7 +30,7 @@ inline int32_t FX_tolower(int32_t ch) { } // namespace int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) { - FXSYS_assert(s1 != NULL && s2 != NULL && count > 0); + ASSERT(s1 != NULL && s2 != NULL && count > 0); FX_WCHAR wch1 = 0; FX_WCHAR wch2 = 0; while (count-- > 0) { @@ -44,7 +44,7 @@ int32_t FX_wcsnicmp(const FX_WCHAR* s1, const FX_WCHAR* s2, size_t count) { } int32_t FX_filelength(FXSYS_FILE* file) { - FXSYS_assert(file != NULL); + ASSERT(file != NULL); #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ return _filelength(_fileno(file)); #else @@ -57,7 +57,7 @@ int32_t FX_filelength(FXSYS_FILE* file) { } FX_BOOL FX_fsetsize(FXSYS_FILE* file, int32_t size) { - FXSYS_assert(file != NULL); + ASSERT(file != NULL); #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ return _chsize(_fileno(file), size) == 0; #elif _FX_OS_ == _FX_WIN32_MOBILE_ @@ -73,7 +73,7 @@ FX_BOOL FX_fsetsize(FXSYS_FILE* file, int32_t size) { } FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t* pUsedLen) { - FXSYS_assert(pwsStr != NULL); + ASSERT(pwsStr != NULL); if (iLength < 0) { iLength = FXSYS_wcslen(pwsStr); } diff --git a/xfa/fgas/crt/fgas_utils.cpp b/xfa/fgas/crt/fgas_utils.cpp index 0d020ec38f..01792b833a 100644 --- a/xfa/fgas/crt/fgas_utils.cpp +++ b/xfa/fgas/crt/fgas_utils.cpp @@ -28,7 +28,7 @@ class FX_BASEARRAYDATA : public CFX_Target { uint8_t* pBuffer; }; CFX_BaseArray::CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize) { - FXSYS_assert(iGrowSize > 0 && iBlockSize > 0); + ASSERT(iGrowSize > 0 && iBlockSize > 0); m_pData = new FX_BASEARRAYDATA(iGrowSize, iBlockSize); } CFX_BaseArray::~CFX_BaseArray() { @@ -42,7 +42,7 @@ int32_t CFX_BaseArray::GetBlockSize() const { return m_pData->iBlockSize; } uint8_t* CFX_BaseArray::AddSpaceTo(int32_t index) { - FXSYS_assert(index > -1); + ASSERT(index > -1); uint8_t*& pBuffer = m_pData->pBuffer; int32_t& iTotalCount = m_pData->iTotalCount; int32_t iBlockSize = m_pData->iBlockSize; @@ -63,7 +63,7 @@ uint8_t* CFX_BaseArray::AddSpaceTo(int32_t index) { return pBuffer + index * iBlockSize; } uint8_t* CFX_BaseArray::GetAt(int32_t index) const { - FXSYS_assert(index > -1 && index < m_pData->iBlockCount); + ASSERT(index > -1 && index < m_pData->iBlockCount); return m_pData->pBuffer + index * m_pData->iBlockSize; } uint8_t* CFX_BaseArray::GetBuffer() const { @@ -73,10 +73,10 @@ int32_t CFX_BaseArray::Append(const CFX_BaseArray& src, int32_t iStart, int32_t iCount) { int32_t iBlockSize = m_pData->iBlockSize; - FXSYS_assert(iBlockSize == src.m_pData->iBlockSize); + ASSERT(iBlockSize == src.m_pData->iBlockSize); int32_t& iBlockCount = m_pData->iBlockCount; int32_t iAdded = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iAdded); + ASSERT(iStart > -1 && iStart < iAdded); if (iCount < 0) { iCount = iAdded; } @@ -96,9 +96,9 @@ int32_t CFX_BaseArray::Copy(const CFX_BaseArray& src, int32_t iStart, int32_t iCount) { int32_t iBlockSize = m_pData->iBlockSize; - FXSYS_assert(iBlockSize == src.m_pData->iBlockSize); + ASSERT(iBlockSize == src.m_pData->iBlockSize); int32_t iCopied = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iCopied); + ASSERT(iStart > -1 && iStart < iCopied); if (iCount < 0) { iCount = iCopied; } @@ -142,7 +142,7 @@ CFX_BaseMassArrayImp::CFX_BaseMassArrayImp(int32_t iChunkSize, m_iBlockSize(iBlockSize), m_iChunkCount(0), m_iBlockCount(0) { - FXSYS_assert(m_iChunkSize > 0 && m_iBlockSize > 0); + ASSERT(m_iChunkSize > 0 && m_iBlockSize > 0); m_pData = new CFX_PtrArray; m_pData->SetSize(16); } @@ -151,7 +151,7 @@ CFX_BaseMassArrayImp::~CFX_BaseMassArrayImp() { delete m_pData; } uint8_t* CFX_BaseMassArrayImp::AddSpaceTo(int32_t index) { - FXSYS_assert(index > -1); + ASSERT(index > -1); uint8_t* pChunk; if (index < m_iBlockCount) { pChunk = (uint8_t*)m_pData->GetAt(index / m_iChunkSize); @@ -172,22 +172,22 @@ uint8_t* CFX_BaseMassArrayImp::AddSpaceTo(int32_t index) { } } } - FXSYS_assert(pChunk != NULL); + ASSERT(pChunk != NULL); m_iBlockCount = index + 1; return pChunk + (index % m_iChunkSize) * m_iBlockSize; } uint8_t* CFX_BaseMassArrayImp::GetAt(int32_t index) const { - FXSYS_assert(index > -1 && index < m_iBlockCount); + ASSERT(index > -1 && index < m_iBlockCount); uint8_t* pChunk = (uint8_t*)m_pData->GetAt(index / m_iChunkSize); - FXSYS_assert(pChunk != NULL); + ASSERT(pChunk != NULL); return pChunk + (index % m_iChunkSize) * m_iBlockSize; } int32_t CFX_BaseMassArrayImp::Append(const CFX_BaseMassArrayImp& src, int32_t iStart, int32_t iCount) { - FXSYS_assert(m_iBlockSize == src.m_iBlockSize); + ASSERT(m_iBlockSize == src.m_iBlockSize); int32_t iAdded = src.m_iBlockCount; - FXSYS_assert(iStart > -1 && iStart < iAdded); + ASSERT(iStart > -1 && iStart < iAdded); if (iCount < 0) { iCount = iAdded; } @@ -206,9 +206,9 @@ int32_t CFX_BaseMassArrayImp::Append(const CFX_BaseMassArrayImp& src, int32_t CFX_BaseMassArrayImp::Copy(const CFX_BaseMassArrayImp& src, int32_t iStart, int32_t iCount) { - FXSYS_assert(m_iBlockSize == src.m_iBlockSize); + ASSERT(m_iBlockSize == src.m_iBlockSize); int32_t iCopied = src.m_iBlockCount; - FXSYS_assert(iStart > -1); + ASSERT(iStart > -1); if (iStart >= iCopied) { return 0; } @@ -233,14 +233,14 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, const CFX_BaseMassArrayImp& src, int32_t iSrcStart, int32_t iSrcCount) { - FXSYS_assert(iDstStart > -1); - FXSYS_assert(m_iBlockSize == src.m_iBlockSize); - FXSYS_assert(src.m_iBlockCount > 0); - FXSYS_assert(m_iBlockCount >= iDstStart + iSrcCount); - FXSYS_assert(iSrcStart > -1); - FXSYS_assert(iSrcStart < src.m_iBlockCount); - FXSYS_assert(iSrcCount > 0); - FXSYS_assert(iSrcStart + iSrcCount <= src.m_iBlockCount); + ASSERT(iDstStart > -1); + ASSERT(m_iBlockSize == src.m_iBlockSize); + ASSERT(src.m_iBlockCount > 0); + ASSERT(m_iBlockCount >= iDstStart + iSrcCount); + ASSERT(iSrcStart > -1); + ASSERT(iSrcStart < src.m_iBlockCount); + ASSERT(iSrcCount > 0); + ASSERT(iSrcStart + iSrcCount <= src.m_iBlockCount); int32_t iDstChunkIndex = iDstStart / m_iChunkSize; int32_t iSrcChunkIndex = iSrcStart / src.m_iChunkSize; @@ -252,7 +252,7 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, std::min(iSrcCount, std::min(iSrcChunkSize, iDstChunkSize)); int32_t iCopyBytes = iCopySize * m_iBlockSize; while (iSrcCount > 0) { - FXSYS_assert(pDstChunk != NULL && pSrcChunk != NULL); + ASSERT(pDstChunk != NULL && pSrcChunk != NULL); FXSYS_memcpy(pDstChunk, pSrcChunk, iCopyBytes); iSrcCount -= iCopySize; iSrcChunkSize -= iCopySize; @@ -340,7 +340,7 @@ struct FX_BASEDISCRETEARRAYDATA { CFX_BaseDiscreteArray::CFX_BaseDiscreteArray(int32_t iChunkSize, int32_t iBlockSize) { - FXSYS_assert(iChunkSize > 0 && iBlockSize > 0); + ASSERT(iChunkSize > 0 && iBlockSize > 0); FX_BASEDISCRETEARRAYDATA* pData = new FX_BASEDISCRETEARRAYDATA; m_pData = pData; pData->ChunkBuffer.SetSize(16); @@ -353,7 +353,7 @@ CFX_BaseDiscreteArray::~CFX_BaseDiscreteArray() { delete static_cast<FX_BASEDISCRETEARRAYDATA*>(m_pData); } uint8_t* CFX_BaseDiscreteArray::AddSpaceTo(int32_t index) { - FXSYS_assert(index > -1); + ASSERT(index > -1); FX_BASEDISCRETEARRAYDATA* pData = (FX_BASEDISCRETEARRAYDATA*)m_pData; int32_t& iChunkCount = pData->iChunkCount; int32_t iChunkSize = pData->iChunkSize; @@ -373,7 +373,7 @@ uint8_t* CFX_BaseDiscreteArray::AddSpaceTo(int32_t index) { return pChunk + (index % iChunkSize) * pData->iBlockSize; } uint8_t* CFX_BaseDiscreteArray::GetAt(int32_t index) const { - FXSYS_assert(index > -1); + ASSERT(index > -1); FX_BASEDISCRETEARRAYDATA* pData = (FX_BASEDISCRETEARRAYDATA*)m_pData; int32_t iChunkSize = pData->iChunkSize; int32_t iChunk = index / iChunkSize; diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h index 5ebb32ff37..ebbcf4bd97 100644 --- a/xfa/fgas/crt/fgas_utils.h +++ b/xfa/fgas/crt/fgas_utils.h @@ -110,12 +110,12 @@ class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray { int32_t Append(const CFX_ObjectBaseArrayTemplate& src, int32_t iStart = 0, int32_t iCount = -1) { - FXSYS_assert(GetBlockSize() == src.GetBlockSize()); + ASSERT(GetBlockSize() == src.GetBlockSize()); if (iCount == 0) { return 0; } int32_t iSize = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iSize); + ASSERT(iStart > -1 && iStart < iSize); if (iCount < 0) { iCount = iSize; } @@ -139,12 +139,12 @@ class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray { int32_t Copy(const CFX_ObjectBaseArrayTemplate& src, int32_t iStart = 0, int32_t iCount = -1) { - FXSYS_assert(GetBlockSize() == src.GetBlockSize()); + ASSERT(GetBlockSize() == src.GetBlockSize()); if (iCount == 0) { return 0; } int32_t iSize = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iSize); + ASSERT(iStart > -1 && iStart < iSize); if (iCount < 0) { iCount = iSize; } @@ -312,7 +312,7 @@ class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray { return CFX_BaseMassArray::GetSize(); } int32_t iSize = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iSize); + ASSERT(iStart > -1 && iStart < iSize); if (iCount < 0) { iCount = iSize; } @@ -332,7 +332,7 @@ class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray { return CFX_BaseMassArray::GetSize(); } int32_t iSize = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iSize); + ASSERT(iStart > -1 && iStart < iSize); if (iCount < 0) { iCount = iSize; } @@ -479,7 +479,7 @@ class CFX_ObjectStackTemplate : public CFX_BaseStack { return CFX_BaseStack::GetSize(); } int32_t iSize = src.GetSize(); - FXSYS_assert(iStart > -1 && iStart < iSize); + ASSERT(iStart > -1 && iStart < iSize); if (iCount < 0) { iCount = iSize; } diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp index 21d5d0b5a5..bccaf2cdb6 100644 --- a/xfa/fgas/font/fgas_fontutils.cpp +++ b/xfa/fgas/font/fgas_fontutils.cpp @@ -136,7 +136,7 @@ static const FGAS_FONTUSB g_FXGdiFontUSBTable[] = { const FGAS_FONTUSB* FGAS_GetUnicodeBitField(FX_WCHAR wUnicode) { int32_t iEnd = sizeof(g_FXGdiFontUSBTable) / sizeof(FGAS_FONTUSB) - 1; - FXSYS_assert(iEnd >= 0); + ASSERT(iEnd >= 0); int32_t iStart = 0, iMid; do { iMid = (iStart + iEnd) / 2; diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp index ed41076535..7bf877f8c2 100644 --- a/xfa/fgas/font/fgas_gefont.cpp +++ b/xfa/fgas/font/fgas_gefont.cpp @@ -130,8 +130,8 @@ CFX_GEFont::CFX_GEFont(const CFX_GEFont& src, uint32_t dwFontStyles) m_SubstFonts(), m_FontMapper(16) { m_pFont = new CFX_Font; - FXSYS_assert(m_pFont != NULL); - FXSYS_assert(src.m_pFont != NULL); + ASSERT(m_pFont != NULL); + ASSERT(src.m_pFont != NULL); m_pFont->LoadClone(src.m_pFont); CFX_SubstFont* pSubst = m_pFont->GetSubstFont(); if (!pSubst) { @@ -357,7 +357,7 @@ void CFX_GEFont::GetPsName(CFX_WideString& wsName) const { wsName = m_pFont->GetPsName(); } uint32_t CFX_GEFont::GetFontStyles() const { - FXSYS_assert(m_pFont != NULL); + ASSERT(m_pFont != NULL); #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ if (m_bUseLogFontStyle) { return m_dwLogFontStyle; @@ -390,7 +390,7 @@ FX_BOOL CFX_GEFont::GetCharWidth(FX_WCHAR wUnicode, int32_t& iWidth, FX_BOOL bRecursive, FX_BOOL bCharCode) { - FXSYS_assert(m_pCharWidthMap != NULL); + ASSERT(m_pCharWidthMap != NULL); iWidth = m_pCharWidthMap->GetAt(wUnicode, 0); if (iWidth < 1) { if (!m_pProvider || @@ -426,8 +426,8 @@ FX_BOOL CFX_GEFont::GetCharBBox(FX_WCHAR wUnicode, CFX_Rect& bbox, FX_BOOL bRecursive, FX_BOOL bCharCode) { - FXSYS_assert(m_pRectArray != NULL); - FXSYS_assert(m_pBBoxMap != NULL); + ASSERT(m_pRectArray != NULL); + ASSERT(m_pBBoxMap != NULL); void* pRect = NULL; if (!m_pBBoxMap->Lookup((void*)(uintptr_t)wUnicode, pRect)) { IFX_Font* pFont = NULL; @@ -478,7 +478,7 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode, FX_BOOL bRecursive, IFX_Font** ppFont, FX_BOOL bCharCode) { - FXSYS_assert(m_pFontEncoding != NULL); + ASSERT(m_pFontEncoding != NULL); int32_t iGlyphIndex = m_pFontEncoding->GlyphFromCharCode(wUnicode); if (iGlyphIndex > 0) { if (ppFont != NULL) { diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index 4b2a1422d2..dedc8b0ad2 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -63,7 +63,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage( return NULL; } } - FXSYS_assert(pFD != NULL); + ASSERT(pFD != NULL); pFont = IFX_Font::LoadFont(pFD->wsFontFace, dwFontStyles, wCodePage, this); if (pFont != NULL) { m_Fonts.Add(pFont); @@ -144,7 +144,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily, return NULL; } } - FXSYS_assert(pFD != NULL); + ASSERT(pFD != NULL); if (wCodePage == 0xFFFF) { wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet); } @@ -159,7 +159,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily, return NULL; } IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) { - FXSYS_assert(pBuffer != NULL && iLength > 0); + ASSERT(pBuffer != NULL && iLength > 0); IFX_Font* pFont = NULL; if (m_BufferFonts.Lookup((void*)pBuffer, (void*&)pFont)) { if (pFont != NULL) { @@ -175,7 +175,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const uint8_t* pBuffer, int32_t iLength) { return NULL; } IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) { - FXSYS_assert(pszFileName != NULL); + ASSERT(pszFileName != NULL); uint32_t dwHash = FX_HashCode_GetW(pszFileName, false); IFX_Font* pFont = NULL; if (m_FileFonts.Lookup((void*)(uintptr_t)dwHash, (void*&)pFont)) { @@ -196,7 +196,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, uint32_t dwFontStyles, uint16_t wCodePage, FX_BOOL bSaveStream) { - FXSYS_assert(pFontStream != NULL && pFontStream->GetLength() > 0); + ASSERT(pFontStream != NULL && pFontStream->GetLength() > 0); IFX_Font* pFont = NULL; if (m_StreamFonts.Lookup((void*)pFontStream, (void*&)pFont)) { if (pFont != NULL) { @@ -224,7 +224,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream, IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont, uint32_t dwFontStyles, uint16_t wCodePage) { - FXSYS_assert(pSrcFont != NULL); + ASSERT(pSrcFont != NULL); if (pSrcFont->GetFontStyles() == dwFontStyles) { return pSrcFont->Retain(); } @@ -1191,7 +1191,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled, ((0 == wCodePage || 0xFFFF == wCodePage) ? (uint16_t)-1 : FX_GetCodePageBit(wCodePage)); if (wBit != (uint16_t)-1) { - FXSYS_assert(wBit < 64); + ASSERT(wBit < 64); if (0 == (pInstalled->m_dwCsb[wBit / 32] & (1 << (wBit % 32)))) { nPenalty += 0xFFFF; } else { @@ -1202,7 +1202,7 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled, ((0 == wcUnicode || 0xFFFE == wcUnicode) ? (uint16_t)999 : FX_GetUnicodeBit(wcUnicode)); if (wBit != (uint16_t)999) { - FXSYS_assert(wBit < 128); + ASSERT(wBit < 128); if (0 == (pInstalled->m_dwUsb[wBit / 32] & (1 << (wBit % 32)))) { nPenalty += 0xFFFF; } else { diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp index 3adb251254..b44af96c77 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.cpp +++ b/xfa/fgas/layout/fgas_rtfbreak.cpp @@ -238,8 +238,8 @@ void CFX_RTFBreak::SetReadingOrder(FX_BOOL bRTL) { m_bRTL = bRTL; } void CFX_RTFBreak::SetAlignment(int32_t iAlignment) { - FXSYS_assert(iAlignment >= FX_RTFLINEALIGNMENT_Left && - iAlignment <= FX_RTFLINEALIGNMENT_Distributed); + ASSERT(iAlignment >= FX_RTFLINEALIGNMENT_Left && + iAlignment <= FX_RTFLINEALIGNMENT_Distributed); m_iAlignment = iAlignment; } void CFX_RTFBreak::SetUserData(IFX_Unknown* pUserData) { @@ -299,7 +299,7 @@ CFX_RTFLine* CFX_RTFBreak::GetRTFLine(FX_BOOL bReady) const { return NULL; } } - FXSYS_assert(m_pCurLine != NULL); + ASSERT(m_pCurLine != NULL); return m_pCurLine; } CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces(FX_BOOL bReady) const { @@ -343,7 +343,7 @@ static const FX_RTFBreak_LPFAppendChar g_FX_RTFBreak_lpfAppendChar[16] = { &CFX_RTFBreak::AppendChar_Others, &CFX_RTFBreak::AppendChar_Others, }; uint32_t CFX_RTFBreak::AppendChar(FX_WCHAR wch) { - FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL && m_pArabicChar != NULL); + ASSERT(m_pFont != NULL && m_pCurLine != NULL && m_pArabicChar != NULL); if (m_bCharCode) { return AppendChar_CharCode(wch); } @@ -392,8 +392,8 @@ uint32_t CFX_RTFBreak::AppendChar(FX_WCHAR wch) { return std::max(dwRet1, dwRet2); } uint32_t CFX_RTFBreak::AppendChar_CharCode(FX_WCHAR wch) { - FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL); - FXSYS_assert(m_bCharCode); + ASSERT(m_pFont != NULL && m_pCurLine != NULL); + ASSERT(m_bCharCode); m_pCurLine->m_iMBCSChars++; CFX_RTFCharArray& tca = m_pCurLine->m_LineChars; CFX_RTFChar* pCurChar = tca.AddSpace(); @@ -606,8 +606,8 @@ uint32_t CFX_RTFBreak::AppendChar_Others(CFX_RTFChar* pCurChar, return FX_RTFBREAK_None; } uint32_t CFX_RTFBreak::EndBreak(uint32_t dwStatus) { - FXSYS_assert(dwStatus >= FX_RTFBREAK_PieceBreak && - dwStatus <= FX_RTFBREAK_PageBreak); + ASSERT(dwStatus >= FX_RTFBREAK_PieceBreak && + dwStatus <= FX_RTFBREAK_PageBreak); m_dwIdentity++; CFX_RTFPieceArray* pCurPieces = &m_pCurLine->m_LinePieces; int32_t iCount = pCurPieces->GetSize(); @@ -1067,7 +1067,7 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca, void CFX_RTFBreak::SplitTextLine(CFX_RTFLine* pCurLine, CFX_RTFLine* pNextLine, FX_BOOL bAllChars) { - FXSYS_assert(pCurLine != NULL && pNextLine != NULL); + ASSERT(pCurLine != NULL && pNextLine != NULL); int32_t iCount = pCurLine->CountChars(); if (iCount < 2) { return; @@ -1181,8 +1181,8 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText, if (pText == NULL || pText->iLength < 1) { return 0; } - FXSYS_assert(pText->pStr != NULL && pText->pWidths != NULL && - pText->pFont != NULL && pText->pRect != NULL); + ASSERT(pText->pStr != NULL && pText->pWidths != NULL && + pText->pFont != NULL && pText->pRect != NULL); const FX_WCHAR* pStr = pText->pStr; int32_t* pWidths = pText->pWidths; int32_t iLength = pText->iLength - 1; @@ -1422,8 +1422,8 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText, if (pText == NULL || pText->iLength < 1) { return 0; } - FXSYS_assert(pText->pStr != NULL && pText->pWidths != NULL && - pText->pFont != NULL && pText->pRect != NULL); + ASSERT(pText->pStr != NULL && pText->pWidths != NULL && + pText->pFont != NULL && pText->pRect != NULL); const FX_WCHAR* pStr = pText->pStr; int32_t* pWidths = pText->pWidths; int32_t iLength = pText->iLength; diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h index 8a66dd9e93..95de85bde6 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.h +++ b/xfa/fgas/layout/fgas_rtfbreak.h @@ -115,7 +115,7 @@ class CFX_RTFPiece : public CFX_Target { m_pUserData(NULL) {} ~CFX_RTFPiece() { Reset(); } void AppendChar(const CFX_RTFChar& tc) { - FXSYS_assert(m_pChars != NULL); + ASSERT(m_pChars != NULL); m_pChars->Add(tc); if (m_iWidth < 0) { m_iWidth = tc.m_iCharWidth; @@ -130,15 +130,15 @@ class CFX_RTFPiece : public CFX_Target { int32_t GetLength() const { return m_iChars; } int32_t GetEndChar() const { return m_iStartChar + m_iChars; } CFX_RTFChar& GetChar(int32_t index) { - FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL); + ASSERT(index > -1 && index < m_iChars && m_pChars != NULL); return *m_pChars->GetDataPtr(m_iStartChar + index); } CFX_RTFChar* GetCharPtr(int32_t index) const { - FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL); + ASSERT(index > -1 && index < m_iChars && m_pChars != NULL); return m_pChars->GetDataPtr(m_iStartChar + index); } void GetString(FX_WCHAR* pText) const { - FXSYS_assert(pText != NULL); + ASSERT(pText != NULL); int32_t iEndChar = m_iStartChar + m_iChars; CFX_RTFChar* pChar; for (int32_t i = m_iStartChar; i < iEndChar; i++) { @@ -152,7 +152,7 @@ class CFX_RTFPiece : public CFX_Target { wsText.ReleaseBuffer(m_iChars); } void GetWidths(int32_t* pWidths) const { - FXSYS_assert(pWidths != NULL); + ASSERT(pWidths != NULL); int32_t iEndChar = m_iStartChar + m_iChars; CFX_RTFChar* pChar; for (int32_t i = m_iStartChar; i < iEndChar; i++) { @@ -202,20 +202,20 @@ class CFX_RTFLine { ~CFX_RTFLine() { RemoveAll(); } int32_t CountChars() const { return m_LineChars.GetSize(); } CFX_RTFChar& GetChar(int32_t index) { - FXSYS_assert(index > -1 && index < m_LineChars.GetSize()); + ASSERT(index > -1 && index < m_LineChars.GetSize()); return *m_LineChars.GetDataPtr(index); } CFX_RTFChar* GetCharPtr(int32_t index) { - FXSYS_assert(index > -1 && index < m_LineChars.GetSize()); + ASSERT(index > -1 && index < m_LineChars.GetSize()); return m_LineChars.GetDataPtr(index); } int32_t CountPieces() const { return m_LinePieces.GetSize(); } CFX_RTFPiece& GetPiece(int32_t index) const { - FXSYS_assert(index > -1 && index < m_LinePieces.GetSize()); + ASSERT(index > -1 && index < m_LinePieces.GetSize()); return m_LinePieces.GetAt(index); } CFX_RTFPiece* GetPiecePtr(int32_t index) const { - FXSYS_assert(index > -1 && index < m_LinePieces.GetSize()); + ASSERT(index > -1 && index < m_LinePieces.GetSize()); return m_LinePieces.GetPtrAt(index); } int32_t GetLineEnd() const { return m_iStart + m_iWidth; } diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp index f8cfcd0066..86fecbeef4 100644 --- a/xfa/fgas/layout/fgas_textbreak.cpp +++ b/xfa/fgas/layout/fgas_textbreak.cpp @@ -70,7 +70,7 @@ CFX_TxtBreak::~CFX_TxtBreak() { } void CFX_TxtBreak::SetLineWidth(FX_FLOAT fLineWidth) { m_iLineWidth = FXSYS_round(fLineWidth * 20000.0f); - FXSYS_assert(m_iLineWidth >= 20000); + ASSERT(m_iLineWidth >= 20000); } void CFX_TxtBreak::SetLinePos(FX_FLOAT fLinePos) { int32_t iLinePos = FXSYS_round(fLinePos * 20000.0f); @@ -167,8 +167,8 @@ void CFX_TxtBreak::SetCharRotation(int32_t iCharRotation) { m_iRotation %= 4; } void CFX_TxtBreak::SetAlignment(int32_t iAlignment) { - FXSYS_assert(iAlignment >= FX_TXTLINEALIGNMENT_Left && - iAlignment <= FX_TXTLINEALIGNMENT_Distributed); + ASSERT(iAlignment >= FX_TXTLINEALIGNMENT_Left && + iAlignment <= FX_TXTLINEALIGNMENT_Distributed); m_iAlignment = iAlignment; ResetArabicContext(); } @@ -342,7 +342,7 @@ void CFX_TxtBreak::AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps) { } uint32_t CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar, int32_t iRotation) { - FXSYS_assert(pCurChar != NULL); + ASSERT(pCurChar != NULL); FX_WCHAR wch = pCurChar->m_wCharCode; FX_WCHAR wForm; int32_t iCharWidth = 0; @@ -608,7 +608,7 @@ uint32_t CFX_TxtBreak::AppendChar(FX_WCHAR wch) { return std::max(dwRet1, dwRet2); } void CFX_TxtBreak::EndBreak_UpdateArabicShapes() { - FXSYS_assert(m_bArabicShapes); + ASSERT(m_bArabicShapes); int32_t iCount = m_pCurLine->CountChars(); if (iCount < 2) { return; @@ -907,8 +907,8 @@ void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos, } } uint32_t CFX_TxtBreak::EndBreak(uint32_t dwStatus) { - FXSYS_assert(dwStatus >= FX_TXTBREAK_PieceBreak && - dwStatus <= FX_TXTBREAK_PageBreak); + ASSERT(dwStatus >= FX_TXTBREAK_PieceBreak && + dwStatus <= FX_TXTBREAK_PageBreak); CFX_TxtPieceArray* pCurPieces = m_pCurLine->m_pLinePieces; int32_t iCount = pCurPieces->GetSize(); if (iCount > 0) { @@ -1074,7 +1074,7 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca, void CFX_TxtBreak::SplitTextLine(CFX_TxtLine* pCurLine, CFX_TxtLine* pNextLine, FX_BOOL bAllChars) { - FXSYS_assert(pCurLine != NULL && pNextLine != NULL); + ASSERT(pCurLine != NULL && pNextLine != NULL); int32_t iCount = pCurLine->CountChars(); if (iCount < 2) { return; diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h index af6d52163f..41bd8f4921 100644 --- a/xfa/fgas/layout/fgas_textbreak.h +++ b/xfa/fgas/layout/fgas_textbreak.h @@ -133,11 +133,11 @@ class CFX_TxtPiece : public CFX_Target { int32_t GetLength() const { return m_iChars; } int32_t GetEndChar() const { return m_iStartChar + m_iChars; } CFX_TxtChar* GetCharPtr(int32_t index) const { - FXSYS_assert(index > -1 && index < m_iChars && m_pChars != NULL); + ASSERT(index > -1 && index < m_iChars && m_pChars != NULL); return m_pChars->GetDataPtr(m_iStartChar + index); } void GetString(FX_WCHAR* pText) const { - FXSYS_assert(pText != NULL); + ASSERT(pText != NULL); int32_t iEndChar = m_iStartChar + m_iChars; CFX_Char* pChar; for (int32_t i = m_iStartChar; i < iEndChar; i++) { @@ -152,7 +152,7 @@ class CFX_TxtPiece : public CFX_Target { wsText.ReleaseBuffer(m_iChars); } void GetWidths(int32_t* pWidths) const { - FXSYS_assert(pWidths != NULL); + ASSERT(pWidths != NULL); int32_t iEndChar = m_iStartChar + m_iChars; CFX_Char* pChar; for (int32_t i = m_iStartChar; i < iEndChar; i++) { @@ -189,12 +189,12 @@ class CFX_TxtLine { } int32_t CountChars() const { return m_pLineChars->GetSize(); } CFX_TxtChar* GetCharPtr(int32_t index) const { - FXSYS_assert(index > -1 && index < m_pLineChars->GetSize()); + ASSERT(index > -1 && index < m_pLineChars->GetSize()); return m_pLineChars->GetDataPtr(index); } int32_t CountPieces() const { return m_pLinePieces->GetSize(); } CFX_TxtPiece* GetPiecePtr(int32_t index) const { - FXSYS_assert(index > -1 && index < m_pLinePieces->GetSize()); + ASSERT(index > -1 && index < m_pLinePieces->GetSize()); return m_pLinePieces->GetPtrAt(index); } void GetString(CFX_WideString& wsStr) const { diff --git a/xfa/fgas/layout/fgas_unicode.cpp b/xfa/fgas/layout/fgas_unicode.cpp index a4cbee03b7..94f06253ac 100644 --- a/xfa/fgas/layout/fgas_unicode.cpp +++ b/xfa/fgas/layout/fgas_unicode.cpp @@ -7,8 +7,8 @@ #include "xfa/fgas/layout/fgas_unicode.h" void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd) { - FXSYS_assert(iStart > -1 && iStart < tpos.GetSize()); - FXSYS_assert(iEnd > -1 && iEnd < tpos.GetSize()); + ASSERT(iStart > -1 && iStart < tpos.GetSize()); + ASSERT(iEnd > -1 && iEnd < tpos.GetSize()); if (iStart >= iEnd) { return; } diff --git a/xfa/fgas/localization/fgas_datetime.cpp b/xfa/fgas/localization/fgas_datetime.cpp index 456e476dee..f3c560b823 100644 --- a/xfa/fgas/localization/fgas_datetime.cpp +++ b/xfa/fgas/localization/fgas_datetime.cpp @@ -31,23 +31,23 @@ const int64_t g_FXMillisecondsPerMinute = 60000; const int64_t g_FXMillisecondsPerHour = 3600000; const int64_t g_FXMillisecondsPerDay = 86400000; FX_BOOL FX_IsLeapYear(int32_t iYear) { - FXSYS_assert(iYear != 0); + ASSERT(iYear != 0); return ((iYear % 4) == 0 && (iYear % 100) != 0) || (iYear % 400) == 0; } int32_t FX_DaysInYear(int32_t iYear) { - FXSYS_assert(iYear != 0); + ASSERT(iYear != 0); return FX_IsLeapYear(iYear) ? g_FXDaysPerLeapYear : g_FXDaysPerYear; } uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth) { - FXSYS_assert(iYear != 0); - FXSYS_assert(iMonth >= 1 && iMonth <= 12); + ASSERT(iYear != 0); + ASSERT(iMonth >= 1 && iMonth <= 12); const uint8_t* p = FX_IsLeapYear(iYear) ? g_FXDaysPerLeapMonth : g_FXDaysPerMonth; return p[iMonth - 1]; } static int32_t FX_DaysBeforeMonthInYear(int32_t iYear, uint8_t iMonth) { - FXSYS_assert(iYear != 0); - FXSYS_assert(iMonth >= 1 && iMonth <= 12); + ASSERT(iYear != 0); + ASSERT(iMonth >= 1 && iMonth <= 12); const int32_t* p = FX_IsLeapYear(iYear) ? g_FXDaysBeforeLeapMonth : g_FXDaysBeforeMonth; return p[iMonth - 1]; @@ -56,9 +56,9 @@ static int64_t FX_DateToDays(int32_t iYear, uint8_t iMonth, uint8_t iDay, FX_BOOL bIncludeThisDay = FALSE) { - FXSYS_assert(iYear != 0); - FXSYS_assert(iMonth >= 1 && iMonth <= 12); - FXSYS_assert(iDay >= 1 && iDay <= FX_DaysInMonth(iYear, iMonth)); + ASSERT(iYear != 0); + ASSERT(iMonth >= 1 && iMonth <= 12); + ASSERT(iDay >= 1 && iDay <= FX_DaysInMonth(iYear, iMonth)); int64_t iDays = FX_DaysBeforeMonthInYear(iYear, iMonth); iDays += iDay; if (!bIncludeThisDay) { @@ -197,10 +197,10 @@ void CFX_Unitime::Set(int32_t year, uint8_t minute, uint8_t second, uint16_t millisecond) { - FXSYS_assert(hour <= 23); - FXSYS_assert(minute <= 59); - FXSYS_assert(second <= 59); - FXSYS_assert(millisecond <= 999); + ASSERT(hour <= 23); + ASSERT(minute <= 59); + ASSERT(second <= 59); + ASSERT(millisecond <= 999); m_iUnitime = (int64_t)hour * g_FXMillisecondsPerHour + (int64_t)minute * g_FXMillisecondsPerMinute + (int64_t)second * g_FXMillisecondsPerSecond + millisecond; diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index 9a8e05cbc7..521b53536e 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -768,7 +768,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern, if (!pLocale) { pLocale = m_pLocaleMgr->GetDefLocale(); } - FXSYS_assert(pLocale != NULL); + ASSERT(pLocale != NULL); pLocale->GetNumPattern(eSubCategory, wsSubCategory); iDotIndex = wsSubCategory.Find('.'); if (iDotIndex > 0) { @@ -2223,7 +2223,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat( if (!pLocale) { pLocale = m_pLocaleMgr->GetDefLocale(); } - FXSYS_assert(pLocale != NULL); + ASSERT(pLocale != NULL); switch (eCategory) { case FX_LOCALECATEGORY_Date: pLocale->GetDatePattern(eSubCategory, wsDatePattern); @@ -4487,7 +4487,7 @@ static inline void fxmath_decimal_helper_raw_mul(uint64_t a[], uint8_t bl, uint64_t c[], uint8_t cl) { - assert(al + bl <= cl); + ASSERT(al + bl <= cl); { for (int i = 0; i < cl; i++) { c[i] = 0; diff --git a/xfa/fgas/xml/fgas_sax_imp.cpp b/xfa/fgas/xml/fgas_sax_imp.cpp index ea3dafff59..d47bc44000 100644 --- a/xfa/fgas/xml/fgas_sax_imp.cpp +++ b/xfa/fgas/xml/fgas_sax_imp.cpp @@ -28,7 +28,7 @@ CFX_SAXFile::CFX_SAXFile() FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile, uint32_t dwStart, uint32_t dwLen) { - FXSYS_assert(m_pFile == NULL && pFile != NULL); + ASSERT(m_pFile == NULL && pFile != NULL); uint32_t dwSize = pFile->GetSize(); if (dwStart >= dwSize) { return FALSE; @@ -52,7 +52,7 @@ FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile, return TRUE; } FX_BOOL CFX_SAXFile::ReadNextBlock() { - FXSYS_assert(m_pFile != NULL); + ASSERT(m_pFile != NULL); uint32_t dwSize = m_dwEnd - m_dwCur; if (dwSize == 0) { return FALSE; @@ -558,7 +558,7 @@ void CFX_SAXReader::SkipNode() { return; } iLen--; - FXSYS_assert(iLen > -1); + ASSERT(iLen > -1); m_SkipStack.RemoveAt(iLen, 1); m_SkipChar = iLen ? m_SkipStack[iLen - 1] : 0; return; @@ -619,7 +619,7 @@ void CFX_SAXReader::SkipNode() { } } void CFX_SAXReader::NotifyData() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag) m_pHandler->OnTagData(m_pCurItem->m_pNode, m_bCharData ? FX_SAXNODE_CharData : FX_SAXNODE_Text, @@ -627,7 +627,7 @@ void CFX_SAXReader::NotifyData() { m_File.m_dwCur + m_dwDataOffset); } void CFX_SAXReader::NotifyEnter() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag || m_pCurItem->m_eNode == FX_SAXNODE_Instruction) { m_pCurItem->m_pNode = @@ -636,7 +636,7 @@ void CFX_SAXReader::NotifyEnter() { } } void CFX_SAXReader::NotifyAttribute() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag || m_pCurItem->m_eNode == FX_SAXNODE_Instruction) { m_pHandler->OnTagAttribute(m_pCurItem->m_pNode, @@ -645,20 +645,20 @@ void CFX_SAXReader::NotifyAttribute() { } } void CFX_SAXReader::NotifyBreak() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag) { m_pHandler->OnTagBreak(m_pCurItem->m_pNode); } } void CFX_SAXReader::NotifyClose() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag || m_pCurItem->m_eNode == FX_SAXNODE_Instruction) { m_pHandler->OnTagClose(m_pCurItem->m_pNode, m_dwNodePos); } } void CFX_SAXReader::NotifyEnd() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Tag) { m_pHandler->OnTagEnd(m_pCurItem->m_pNode, CFX_ByteStringC(m_pszData, m_iDataLength), @@ -666,7 +666,7 @@ void CFX_SAXReader::NotifyEnd() { } } void CFX_SAXReader::NotifyTargetData() { - FXSYS_assert(m_pHandler != NULL); + ASSERT(m_pHandler != NULL); if (m_pCurItem->m_eNode == FX_SAXNODE_Instruction) { m_pHandler->OnTargetData(m_pCurItem->m_pNode, m_pCurItem->m_eNode, CFX_ByteStringC(m_pszName, m_iNameLength), |