| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |