summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/fgas_encode.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-27 12:26:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 12:26:01 -0700
commit43854a5073602a4613131aa6dbac5f7b9a095bcd (patch)
tree653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fgas/crt/fgas_encode.cpp
parentb2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff)
downloadpdfium-43854a5073602a4613131aa6dbac5f7b9a095bcd.tar.xz
Standardize on ASSERT.
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
Diffstat (limited to 'xfa/fgas/crt/fgas_encode.cpp')
-rw-r--r--xfa/fgas/crt/fgas_encode.cpp12
1 files changed, 6 insertions, 6 deletions
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 {