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

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.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 "pageint.h" 7 #include "pageint.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (pParams) 342 if (pParams)
343 pParam = pParams->GetDict(0); 343 pParam = pParams->GetDict(0);
344 } else { 344 } else {
345 Decoder = pFilter->GetString(); 345 Decoder = pFilter->GetString();
346 pParam = pDict->GetDict("DecodeParms"); 346 pParam = pDict->GetDict("DecodeParms");
347 } 347 }
348 } 348 }
349 FX_DWORD width = pDict->GetInteger("Width"); 349 FX_DWORD width = pDict->GetInteger("Width");
350 FX_DWORD height = pDict->GetInteger("Height"); 350 FX_DWORD height = pDict->GetInteger("Height");
351 FX_DWORD OrigSize = 0; 351 FX_DWORD OrigSize = 0;
352 if (pCSObj != NULL) { 352 if (pCSObj) {
353 FX_DWORD bpc = pDict->GetInteger("BitsPerComponent"); 353 FX_DWORD bpc = pDict->GetInteger("BitsPerComponent");
354 FX_DWORD nComponents = 1; 354 FX_DWORD nComponents = 1;
355 CPDF_ColorSpace* pCS = pDoc->LoadColorSpace(pCSObj); 355 CPDF_ColorSpace* pCS = pDoc->LoadColorSpace(pCSObj);
356 if (pCS == NULL) { 356 if (pCS == NULL) {
357 nComponents = 3; 357 nComponents = 3;
358 } else { 358 } else {
359 nComponents = pCS->CountComponents(); 359 nComponents = pCS->CountComponents();
360 pDoc->GetPageData()->ReleaseColorSpace(pCSObj); 360 pDoc->GetPageData()->ReleaseColorSpace(pCSObj);
361 } 361 }
362 FX_DWORD pitch = width; 362 FX_DWORD pitch = width;
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 } 1120 }
1121 m_Status = Done; 1121 m_Status = Done;
1122 return; 1122 return;
1123 } 1123 }
1124 steps++; 1124 steps++;
1125 if (pPause && pPause->NeedToPauseNow()) { 1125 if (pPause && pPause->NeedToPauseNow()) {
1126 break; 1126 break;
1127 } 1127 }
1128 } 1128 }
1129 } 1129 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_font/ttgsubtable.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698