summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-03 11:53:59 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-04 08:47:27 +0200
commitf4a755cf7de2d028f5c47c1d0223422d00a05e47 (patch)
treefae8ed4d7026bf6505a892d984fae9b247415532 /vcl/source/control
parent4d43de52e0597076a81b8f8e5cee1afbf0b84b8b (diff)
tdf#161853 Simplify SvxIconChoiceCtrl_Impl::RepaintSelectedEntries
* Drop superfluous check at the start. (Loop will just do nothing if there are no elements.) * Use range-based for. Change-Id: Idbe0ba67268cf76d38b27fcf94e59eb8abd5f566 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169971 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/imivctl1.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index f96873d940e8..fbbc481eab32 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -473,14 +473,9 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const too
void SvxIconChoiceCtrl_Impl::RepaintSelectedEntries()
{
- const size_t nCount = maZOrderList.size();
- if (!nCount)
- return;
-
tools::Rectangle aOutRect(GetOutputRect());
- for (size_t nCur = 0; nCur < nCount; nCur++)
+ for (SvxIconChoiceCtrlEntry* pEntry : maZOrderList)
{
- SvxIconChoiceCtrlEntry* pEntry = maZOrderList[nCur];
if (pEntry->GetFlags() & SvxIconViewFlags::SELECTED)
{
const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry);