summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_annot.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:34:00 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:34:00 -0800
commit412e908082a361d0fd9591eab939e96a882212f1 (patch)
tree11726052ae08f13dc5a05a82cbce870758580aeb /core/src/fpdfdoc/doc_annot.cpp
parent96660d6f382204339d6b1aadc3913303d436e252 (diff)
downloadpdfium-412e908082a361d0fd9591eab939e96a882212f1.tar.xz
Merge to XFA: Get rid of most instance of 'foo == NULL'
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
Diffstat (limited to 'core/src/fpdfdoc/doc_annot.cpp')
-rw-r--r--core/src/fpdfdoc/doc_annot.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index 0871b357cf..8f3d7f99eb 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();