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/fpdfdoc/doc_annot.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/fpdfdoc/doc_action.cpp ('k') | core/src/fpdfdoc/doc_ap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_annot.cpp
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index 0871b357cf69970d2d7e85087f8d1db916dc0fb0..8f3d7f99eb054851caf415623de52e05e8935984 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -133,7 +133,7 @@ CFX_ByteString CPDF_Annot::GetSubType() const {
}
void CPDF_Annot::GetRect(CPDF_Rect& rect) const {
- if (m_pAnnotDict == NULL) {
+ if (!m_pAnnotDict) {
return;
}
rect = m_pAnnotDict->GetRect("Rect");
@@ -147,7 +147,7 @@ FX_DWORD CPDF_Annot::GetFlags() const {
CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict,
CPDF_Annot::AppearanceMode mode) {
CPDF_Dictionary* pAP = pAnnotDict->GetDict("AP");
- if (pAP == NULL) {
+ if (!pAP) {
return NULL;
}
const FX_CHAR* ap_entry = "N";
@@ -267,14 +267,14 @@ void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice,
char style_char;
FX_FLOAT width;
CPDF_Array* pDashArray = NULL;
- if (pBS == NULL) {
+ if (!pBS) {
CPDF_Array* pBorderArray = m_pAnnotDict->GetArray("Border");
style_char = 'S';
if (pBorderArray) {
width = pBorderArray->GetNumber(2);
if (pBorderArray->GetCount() == 4) {
pDashArray = pBorderArray->GetArray(3);
- if (pDashArray == NULL) {
+ if (!pDashArray) {
return;
}
int nLen = pDashArray->GetCount();
« no previous file with comments | « core/src/fpdfdoc/doc_action.cpp ('k') | core/src/fpdfdoc/doc_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698