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

Side by Side Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.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 "editint.h" 7 #include "editint.h"
8 8
9 #include "core/include/fxcrt/fx_ext.h" 9 #include "core/include/fxcrt/fx_ext.h"
10 #include "core/include/fpdfapi/fpdf_serial.h" 10 #include "core/include/fpdfapi/fpdf_serial.h"
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 i++; 1426 i++;
1427 } 1427 }
1428 if (i >= iCount) { 1428 if (i >= iCount) {
1429 return; 1429 return;
1430 } 1430 }
1431 FX_DWORD dwLastObjNum = dwStartObjNum; 1431 FX_DWORD dwLastObjNum = dwStartObjNum;
1432 i++; 1432 i++;
1433 FX_BOOL bNewStart = FALSE; 1433 FX_BOOL bNewStart = FALSE;
1434 for (; i < iCount; i++) { 1434 for (; i < iCount; i++) {
1435 FX_DWORD dwCurObjNum = m_NewObjNumArray.ElementAt(i); 1435 FX_DWORD dwCurObjNum = m_NewObjNumArray.ElementAt(i);
1436 FX_BOOL bExist = (dwCurObjNum < nOldSize && 1436 FX_BOOL bExist =
1437 m_ObjectOffset.GetPtrAt(dwCurObjNum) != NULL); 1437 (dwCurObjNum < nOldSize && m_ObjectOffset.GetPtrAt(dwCurObjNum));
1438 if (bExist || dwCurObjNum - dwLastObjNum > 1) { 1438 if (bExist || dwCurObjNum - dwLastObjNum > 1) {
1439 if (!bNewStart) { 1439 if (!bNewStart) {
1440 m_ObjectOffset.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1); 1440 m_ObjectOffset.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
1441 m_ObjectSize.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1); 1441 m_ObjectSize.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
1442 } 1442 }
1443 dwStartObjNum = dwCurObjNum; 1443 dwStartObjNum = dwCurObjNum;
1444 } 1444 }
1445 if (bNewStart) { 1445 if (bNewStart) {
1446 dwStartObjNum = dwCurObjNum; 1446 dwStartObjNum = dwCurObjNum;
1447 } 1447 }
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 m_bNewCrypto = FALSE; 2103 m_bNewCrypto = FALSE;
2104 if (!m_bStandardSecurity) { 2104 if (!m_bStandardSecurity) {
2105 return; 2105 return;
2106 } 2106 }
2107 if (m_pEncryptDict) { 2107 if (m_pEncryptDict) {
2108 m_pEncryptDict->Release(); 2108 m_pEncryptDict->Release();
2109 m_pEncryptDict = NULL; 2109 m_pEncryptDict = NULL;
2110 } 2110 }
2111 m_bStandardSecurity = FALSE; 2111 m_bStandardSecurity = FALSE;
2112 } 2112 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698