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

Side by Side Diff: core/include/fpdfapi/fpdf_resource.h

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 unified diff | Download patch
« no previous file with comments | « no previous file | core/include/fxcrt/fx_basic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 FX_DWORD m_dwStdConversion; 598 FX_DWORD m_dwStdConversion;
599 }; 599 };
600 class CPDF_Color { 600 class CPDF_Color {
601 public: 601 public:
602 CPDF_Color() : m_pCS(NULL), m_pBuffer(NULL) {} 602 CPDF_Color() : m_pCS(NULL), m_pBuffer(NULL) {}
603 603
604 CPDF_Color(int family); 604 CPDF_Color(int family);
605 605
606 ~CPDF_Color(); 606 ~CPDF_Color();
607 607
608 FX_BOOL IsNull() const { return m_pBuffer == NULL; } 608 FX_BOOL IsNull() const { return !m_pBuffer; }
609 609
610 FX_BOOL IsEqual(const CPDF_Color& other) const; 610 FX_BOOL IsEqual(const CPDF_Color& other) const;
611 611
612 FX_BOOL IsPattern() const { 612 FX_BOOL IsPattern() const {
613 return m_pCS && m_pCS->GetFamily() == PDFCS_PATTERN; 613 return m_pCS && m_pCS->GetFamily() == PDFCS_PATTERN;
614 } 614 }
615 615
616 void Copy(const CPDF_Color* pSrc); 616 void Copy(const CPDF_Color* pSrc);
617 617
618 void SetColorSpace(CPDF_ColorSpace* pCS); 618 void SetColorSpace(CPDF_ColorSpace* pCS);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 852
853 FX_BOOL m_bInterpolate; 853 FX_BOOL m_bInterpolate;
854 854
855 CPDF_Document* m_pDocument; 855 CPDF_Document* m_pDocument;
856 856
857 CPDF_Dictionary* m_pOC; 857 CPDF_Dictionary* m_pOC;
858 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); 858 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size);
859 }; 859 };
860 860
861 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 861 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fxcrt/fx_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698