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

Side by Side Diff: core/src/fxcrt/fx_xml_parser.cpp

Issue 361553002: Remove "this==NULL" and adjust corresponding callers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix if check warning Created 6 years, 5 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
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp » ('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 #include "../../include/fxcrt/fx_xml.h" 7 #include "../../include/fxcrt/fx_xml.h"
8 #include "xml_int.h" 8 #include "xml_int.h"
9 CXML_Parser::~CXML_Parser() 9 CXML_Parser::~CXML_Parser()
10 { 10 {
11 if (m_bOwnedStream) { 11 if (m_bOwnedStream && m_pDataAcc) {
12 m_pDataAcc->Release(); 12 m_pDataAcc->Release();
13 } 13 }
14 } 14 }
15 FX_BOOL CXML_Parser::Init(FX_LPBYTE pBuffer, size_t size) 15 FX_BOOL CXML_Parser::Init(FX_LPBYTE pBuffer, size_t size)
16 { 16 {
17 if (m_pAllocator) { 17 if (m_pAllocator) {
18 m_pDataAcc = FX_NewAtAllocator(m_pAllocator)CXML_DataBufAcc(pBuffer, siz e, m_pAllocator); 18 m_pDataAcc = FX_NewAtAllocator(m_pAllocator)CXML_DataBufAcc(pBuffer, siz e, m_pAllocator);
19 } else { 19 } else {
20 m_pDataAcc = FX_NEW CXML_DataBufAcc(pBuffer, size, NULL); 20 m_pDataAcc = FX_NEW CXML_DataBufAcc(pBuffer, size, NULL);
21 } 21 }
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 item.Empty(pAllocator); 1008 item.Empty(pAllocator);
1009 } 1009 }
1010 m_pMap->RemoveAll(); 1010 m_pMap->RemoveAll();
1011 if (pAllocator) { 1011 if (pAllocator) {
1012 FX_DeleteAtAllocator(m_pMap, pAllocator, CFX_ObjectArray<CXML_AttrItem>) ; 1012 FX_DeleteAtAllocator(m_pMap, pAllocator, CFX_ObjectArray<CXML_AttrItem>) ;
1013 } else { 1013 } else {
1014 delete m_pMap; 1014 delete m_pMap;
1015 } 1015 }
1016 m_pMap = NULL; 1016 m_pMap = NULL;
1017 } 1017 }
OLDNEW
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698