sw/source/uibase/shells/textsh1.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9b2c470c317fcf3cb248c4fffbbe21f4311205b2
Author:     Adesola Samuel <adesolasamuel2...@outlook.com>
AuthorDate: Fri Nov 1 23:44:53 2024 +0100
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Sat Nov 2 16:26:28 2024 +0100

    tdf#145538 Use range based for loop in textsh1.cxx
    
    Change-Id: I6e902b6947a27fe234d321ed3055dd0f867138a1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175940
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 0480aeaf2b20..78ae5f81ebcd 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -525,9 +525,8 @@ void DeleteSections(SfxRequest& rReq, SwWrtShell& rWrtSh)
     SwDoc* pDoc = rWrtSh.GetDoc();
     SwSectionFormats& rFormats = pDoc->GetSections();
     std::vector<SwSectionFormat*> aRemovals;
-    for (size_t i = 0; i < rFormats.size(); ++i)
+    for (SwSectionFormat* pFormat : rFormats)
     {
-        SwSectionFormat* pFormat = rFormats[i];
 
         if (!aSectionNamePrefix.isEmpty())
         {

Reply via email to