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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase 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/fpdfapi/fpdf_page/fpdf_page_func.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 63f957a838f877e91136d8a6229daf6905d92ed0..d8f21c692de4b316a7c5fa071a8abf305b1c06ff 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -103,7 +103,7 @@ CPDF_Rect CPDF_ClipPath::GetClipBox() const {
FX_BOOL bLayerStarted = FALSE;
for (int i = 0; i < count; i++) {
CPDF_TextObject* pTextObj = GetText(i);
- if (pTextObj == NULL) {
+ if (!pTextObj) {
if (!bStarted) {
rect = layer_rect;
bStarted = TRUE;
@@ -637,7 +637,7 @@ void CPDF_ContentMarkData::AddMark(const CFX_ByteString& name,
FX_BOOL bDirect) {
CPDF_ContentMarkItem& item = m_Marks.Add();
item.SetName(name);
- if (pDict == NULL) {
+ if (!pDict) {
return;
}
item.SetParam(bDirect ? CPDF_ContentMarkItem::DirectDict
@@ -652,7 +652,7 @@ void CPDF_ContentMarkData::DeleteLastMark() {
m_Marks.RemoveAt(size - 1);
}
FX_BOOL CPDF_ContentMark::HasMark(const CFX_ByteStringC& mark) const {
- if (m_pObject == NULL) {
+ if (!m_pObject) {
return FALSE;
}
for (int i = 0; i < m_pObject->CountItems(); i++) {
@@ -665,7 +665,7 @@ FX_BOOL CPDF_ContentMark::HasMark(const CFX_ByteStringC& mark) const {
}
FX_BOOL CPDF_ContentMark::LookupMark(const CFX_ByteStringC& mark,
CPDF_Dictionary*& pDict) const {
- if (m_pObject == NULL) {
+ if (!m_pObject) {
return FALSE;
}
for (int i = 0; i < m_pObject->CountItems(); i++) {
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698