diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
commit | 96660d6f382204339d6b1aadc3913303d436e252 (patch) | |
tree | b5f84756e1a89251831cebc05b9d4e1f6cb2027b /core/src/fxcrt/fx_basic_buffer.cpp | |
parent | d983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff) | |
download | pdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz |
Merge to XFA: Get rid of most instance of 'foo != NULL'
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1512763013 .
(cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7)
Review URL: https://codereview.chromium.org/1529553003 .
Diffstat (limited to 'core/src/fxcrt/fx_basic_buffer.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_buffer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp index cc72e471f1..e5c6c6d4b9 100644 --- a/core/src/fxcrt/fx_basic_buffer.cpp +++ b/core/src/fxcrt/fx_basic_buffer.cpp @@ -151,7 +151,7 @@ void CFX_WideTextBuf::AppendChar(FX_WCHAR ch) { if (m_AllocSize < m_DataSize + (FX_STRSIZE)sizeof(FX_WCHAR)) { ExpandBuf(sizeof(FX_WCHAR)); } - ASSERT(m_pBuffer != NULL); + ASSERT(m_pBuffer); *(FX_WCHAR*)(m_pBuffer + m_DataSize) = ch; m_DataSize += sizeof(FX_WCHAR); } @@ -170,7 +170,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator<<(int i) { if (m_AllocSize < m_DataSize + (FX_STRSIZE)(len * sizeof(FX_WCHAR))) { ExpandBuf(len * sizeof(FX_WCHAR)); } - ASSERT(m_pBuffer != NULL); + ASSERT(m_pBuffer); FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer + m_DataSize); for (FX_STRSIZE j = 0; j < len; j++) { *str++ = buf[j]; @@ -184,7 +184,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator<<(double f) { if (m_AllocSize < m_DataSize + (FX_STRSIZE)(len * sizeof(FX_WCHAR))) { ExpandBuf(len * sizeof(FX_WCHAR)); } - ASSERT(m_pBuffer != NULL); + ASSERT(m_pBuffer); FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer + m_DataSize); for (FX_STRSIZE i = 0; i < len; i++) { *str++ = buf[i]; |