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

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

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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 "xml_int.h" 7 #include "xml_int.h"
8 8
9 #include "core/include/fxcrt/fx_ext.h" 9 #include "core/include/fxcrt/fx_ext.h"
10 #include "core/include/fxcrt/fx_xml.h" 10 #include "core/include/fxcrt/fx_xml.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 item.m_AttrName == name) { 812 item.m_AttrName == name) {
813 m_pMap->RemoveAt(i); 813 m_pMap->RemoveAt(i);
814 return; 814 return;
815 } 815 }
816 } 816 }
817 } 817 }
818 int CXML_AttrMap::GetSize() const { 818 int CXML_AttrMap::GetSize() const {
819 return m_pMap == NULL ? 0 : m_pMap->GetSize(); 819 return m_pMap == NULL ? 0 : m_pMap->GetSize();
820 } 820 }
821 CXML_AttrItem& CXML_AttrMap::GetAt(int index) const { 821 CXML_AttrItem& CXML_AttrMap::GetAt(int index) const {
822 ASSERT(m_pMap != NULL);
823 return (*m_pMap)[index]; 822 return (*m_pMap)[index];
824 } 823 }
825 void CXML_AttrMap::RemoveAll() { 824 void CXML_AttrMap::RemoveAll() {
826 if (!m_pMap) { 825 if (!m_pMap) {
827 return; 826 return;
828 } 827 }
829 m_pMap->RemoveAll(); 828 m_pMap->RemoveAll();
830 delete m_pMap; 829 delete m_pMap;
831 m_pMap = NULL; 830 m_pMap = NULL;
832 } 831 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698