cui/source/tabpages/swpossizetabpage.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 96882cdec23c64974737c4833f157d54b85a129e Author: Ankur Khandelwal <khandelwalankur...@gmail.com> AuthorDate: Tue Oct 19 13:06:34 2021 +0530 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Thu Dec 30 21:43:53 2021 +0100 tdf#145538 Use range based loops * Use range based loops in cui/source/tabpages/swpossizetabpage.cxx + Goal: Better readability of the code Change-Id: I8df81be6d6d628d4f3366bc2de4b3e44adbc430f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123871 Tested-by: Jenkins Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 105cf43f7ca2..8bd464a799ee 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -465,19 +465,19 @@ static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( {SvxSwFramePosString::REL_FRM_TOP, SvxSwFramePosString::REL_FRM_LEFT }, {SvxSwFramePosString::REL_FRM_BOTTOM, SvxSwFramePosString::REL_FRM_RIGHT } }; - for(size_t nIndex = 0; nIndex < SAL_N_ELEMENTS(aHoriIds); ++nIndex) + for(const auto &a : aHoriIds) { - if(aHoriIds[nIndex].eHori == eStringId) + if(a.eHori == eStringId) { - eStringId = aHoriIds[nIndex].eVert; + eStringId = a.eVert; return eStringId; } } - for(size_t nIndex = 0; nIndex < SAL_N_ELEMENTS(aVertIds); ++nIndex) + for(const auto &a : aVertIds) { - if(aVertIds[nIndex].eHori == eStringId) + if(a.eHori == eStringId) { - eStringId = aVertIds[nIndex].eVert; + eStringId = a.eVert; break; } }