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

Side by Side Diff: core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Git rid of comparisons against NULL Created 4 years, 6 months 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/fpdfapi/fpdf_edit/editint.h" 7 #include "core/fpdfapi/fpdf_edit/editint.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 } 1549 }
1550 if (m_iStage == 26) { 1550 if (m_iStage == 26) {
1551 int32_t iRet = 1551 int32_t iRet =
1552 WriteNewObjs((m_dwFlags & FPDFCREATE_INCREMENTAL) != 0, pPause); 1552 WriteNewObjs((m_dwFlags & FPDFCREATE_INCREMENTAL) != 0, pPause);
1553 if (iRet) { 1553 if (iRet) {
1554 return iRet; 1554 return iRet;
1555 } 1555 }
1556 m_iStage = 27; 1556 m_iStage = 27;
1557 } 1557 }
1558 if (m_iStage == 27) { 1558 if (m_iStage == 27) {
1559 if (NULL != m_pEncryptDict && 0 == m_pEncryptDict->GetObjNum()) { 1559 if (m_pEncryptDict && 0 == m_pEncryptDict->GetObjNum()) {
Tom Sepez 2016/06/02 20:09:48 nit: mumble == 0 rather than 0 == mumble.
Lei Zhang 2016/06/07 07:33:23 Someone else took care of it.
1560 m_dwLastObjNum += 1; 1560 m_dwLastObjNum += 1;
1561 FX_FILESIZE saveOffset = m_Offset; 1561 FX_FILESIZE saveOffset = m_Offset;
1562 if (WriteIndirectObj(m_dwLastObjNum, m_pEncryptDict) < 0) { 1562 if (WriteIndirectObj(m_dwLastObjNum, m_pEncryptDict) < 0) {
1563 return -1; 1563 return -1;
1564 } 1564 }
1565 m_ObjectOffset.Add(m_dwLastObjNum, 1); 1565 m_ObjectOffset.Add(m_dwLastObjNum, 1);
1566 m_ObjectOffset[m_dwLastObjNum] = saveOffset; 1566 m_ObjectOffset[m_dwLastObjNum] = saveOffset;
1567 m_dwEncryptObjNum = m_dwLastObjNum; 1567 m_dwEncryptObjNum = m_dwLastObjNum;
1568 if (m_dwFlags & FPDFCREATE_INCREMENTAL) { 1568 if (m_dwFlags & FPDFCREATE_INCREMENTAL) {
1569 m_NewObjNumArray.Add(m_dwLastObjNum); 1569 m_NewObjNumArray.Add(m_dwLastObjNum);
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 m_pCryptoHandler = nullptr; 2009 m_pCryptoHandler = nullptr;
2010 } 2010 }
2011 void CPDF_Creator::ResetStandardSecurity() { 2011 void CPDF_Creator::ResetStandardSecurity() {
2012 if (!m_bLocalCryptoHandler) 2012 if (!m_bLocalCryptoHandler)
2013 return; 2013 return;
2014 2014
2015 delete m_pCryptoHandler; 2015 delete m_pCryptoHandler;
2016 m_pCryptoHandler = nullptr; 2016 m_pCryptoHandler = nullptr;
2017 m_bLocalCryptoHandler = FALSE; 2017 m_bLocalCryptoHandler = FALSE;
2018 } 2018 }
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_font/cpdf_simplefont.cpp » ('j') | core/fxcodec/codec/fx_codec_jpeg.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698