From d1cfe4228316322d0ae9f3b8020036e5140fc32b Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 1 Mar 2022 14:33:33 +0100 Subject: Remove 'const' from for loop variable In the commit f63a6f2e396fa41ed1338dcec874e06159cafa9f, a for loop is converted into a range-based for loop. The pointer is used to change the nodes using xmlUnlinkNode() and xmlFreeNode(), thus the 'const' should have not been used. The reinterpret_cast does not change the constness, thus I have removed the const from the loop variable, and it will no longer be a const reference. Change-Id: If4c61017ea77f464230bb5802f6fc928acc7a7e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130792 Tested-by: Jenkins Reviewed-by: Hossein --- sax/source/fastparser/fastparser.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index beb30443ba02..71b316378e01 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -674,7 +674,7 @@ FastSaxParserImpl::~FastSaxParserImpl() { if( mxDocumentLocator.is() ) mxDocumentLocator->dispose(); - for (const auto& entity : m_TemporalEntities) + for (auto& entity : m_TemporalEntities) { if (!entity) continue; -- cgit