Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: core/src/fxcrt/fx_basic_buffer.cpp

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_buffer.cpp
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index 3228ca3e7a61def83d95101e61f6809c60ab3b25..548581c9cba28ae4db66292e462e643bbf2be662 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];
« no previous file with comments | « core/src/fxcrt/fx_basic_bstring.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698