diff options
author | Deep17 <deepoose2011@gmail.com> | 2022-02-27 14:55:58 -0500 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2022-03-01 13:03:05 +0100 |
commit | f63a6f2e396fa41ed1338dcec874e06159cafa9f (patch) | |
tree | 7971bdff1bb89a9292293c11957cfdcb9e8092fc /sax/source | |
parent | 2ca987b1a9bcb6bf248d31972b3035fb5e302896 (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.cxx | 6 |
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); } |