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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_document.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 unified diff | Download patch
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 #include "core/include/fpdfapi/fpdf_module.h" 7 #include "core/include/fpdfapi/fpdf_module.h"
8 #include "core/include/fpdfapi/fpdf_parser.h" 8 #include "core/include/fpdfapi/fpdf_parser.h"
9 9
10 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) 10 CPDF_Document::CPDF_Document(CPDF_Parser* pParser)
11 : CPDF_IndirectObjects(pParser) { 11 : CPDF_IndirectObjects(pParser) {
12 ASSERT(pParser != NULL); 12 ASSERT(pParser);
13 m_pRootDict = NULL; 13 m_pRootDict = NULL;
14 m_pInfoDict = NULL; 14 m_pInfoDict = NULL;
15 m_bLinearized = FALSE; 15 m_bLinearized = FALSE;
16 m_dwFirstPageNo = 0; 16 m_dwFirstPageNo = 0;
17 m_dwFirstPageObjNum = 0; 17 m_dwFirstPageObjNum = 0;
18 m_pDocPage = CPDF_ModuleMgr::Get()->GetPageModule()->CreateDocData(this); 18 m_pDocPage = CPDF_ModuleMgr::Get()->GetPageModule()->CreateDocData(this);
19 m_pDocRender = CPDF_ModuleMgr::Get()->GetRenderModule()->CreateDocData(this); 19 m_pDocRender = CPDF_ModuleMgr::Get()->GetRenderModule()->CreateDocData(this);
20 } 20 }
21 CPDF_DocPageData* CPDF_Document::GetValidatePageData() { 21 CPDF_DocPageData* CPDF_Document::GetValidatePageData() {
22 if (m_pDocPage) { 22 if (m_pDocPage) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void CPDF_Document::ClearPageData() { 346 void CPDF_Document::ClearPageData() {
347 if (m_pDocPage) { 347 if (m_pDocPage) {
348 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); 348 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this);
349 } 349 }
350 } 350 }
351 void CPDF_Document::ClearRenderData() { 351 void CPDF_Document::ClearRenderData() {
352 if (m_pDocRender) { 352 if (m_pDocRender) {
353 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); 353 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender);
354 } 354 }
355 } 355 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698