summaryrefslogtreecommitdiff
path: root/sax/source
diff options
context:
space:
mode:
authorDeep17 <deepoose2011@gmail.com>2022-02-27 14:55:58 -0500
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2022-03-01 13:03:05 +0100
commitf63a6f2e396fa41ed1338dcec874e06159cafa9f (patch)
tree7971bdff1bb89a9292293c11957cfdcb9e8092fc /sax/source
parent2ca987b1a9bcb6bf248d31972b3035fb5e302896 (diff)
tdf#145538 - Use range based for loops
Change-Id: I489a13330501ddfa1556a523f8334460505c0e61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130658 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sax/source')
-rw-r--r--sax/source/fastparser/fastparser.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 9effb82c348c..beb30443ba02 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -674,11 +674,11 @@ FastSaxParserImpl::~FastSaxParserImpl()
{
if( mxDocumentLocator.is() )
mxDocumentLocator->dispose();
- for ( size_t i = 0; i < m_TemporalEntities.size(); ++i )
+ for (const auto& entity : m_TemporalEntities)
{
- if (!m_TemporalEntities[i])
+ if (!entity)
continue;
- xmlNodePtr pPtr = reinterpret_cast<xmlNodePtr>(m_TemporalEntities[i]);
+ xmlNodePtr pPtr = reinterpret_cast<xmlNodePtr>(entity);
xmlUnlinkNode(pPtr);
xmlFreeNode(pPtr);
}