sax/source/fastparser/fastparser.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit f63a6f2e396fa41ed1338dcec874e06159cafa9f Author: Deep17 <deepoose2...@gmail.com> AuthorDate: Sun Feb 27 14:55:58 2022 -0500 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Tue Mar 1 13:03:05 2022 +0100 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 <hoss...@libreoffice.org> 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); }