diff options
Diffstat (limited to 'vcl/source/window/accessibility.cxx')
-rw-r--r-- | vcl/source/window/accessibility.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 55c9d3071d36..ab2ac82bee85 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -605,11 +605,10 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() const if (!aMnemonicLabels.empty()) { //if we have multiple labels, then prefer the first that is visible - for (auto aI = aMnemonicLabels.begin(), aEnd = aMnemonicLabels.end(); aI != aEnd; ++aI) + for (auto const & rCandidate : aMnemonicLabels) { - vcl::Window *pCandidate = *aI; - if (pCandidate->IsVisible()) - return pCandidate; + if (rCandidate->IsVisible()) + return rCandidate; } return aMnemonicLabels[0]; } |