diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-27 12:26:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 12:26:01 -0700 |
commit | 43854a5073602a4613131aa6dbac5f7b9a095bcd (patch) | |
tree | 653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fgas/crt/fgas_system.cpp | |
parent | b2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff) | |
download | pdfium-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_system.cpp')
-rw-r--r-- | xfa/fgas/crt/fgas_system.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |