From 12348430e0139b4f2e72984e8a1619baca842df6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 31 May 2022 15:29:53 +0200 Subject: Use a range-based for loop Change-Id: I50742cd64c63d6c81599ebda3ff2c093e722c91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135190 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- cui/source/options/fontsubs.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 67a34dec489e..b5c98b76663b 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -204,10 +204,10 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet* ) std::vector aFontSubs = svtools::GetFontSubstitutions(); std::unique_ptr xIter(m_xCheckLB->make_iterator()); - for (sal_Int32 i = 0; i < static_cast(aFontSubs.size()); ++i) + for (auto const & i: aFontSubs) { m_xCheckLB->append(xIter.get()); - const SubstitutionStruct* pSubs = &aFontSubs[i]; + const SubstitutionStruct* pSubs = &i; m_xCheckLB->set_toggle(*xIter, pSubs->bReplaceAlways ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xCheckLB->set_toggle(*xIter, pSubs->bReplaceOnScreenOnly ? TRISTATE_TRUE : TRISTATE_FALSE, 1); m_xCheckLB->set_text(*xIter, pSubs->sFont, 2); -- cgit