summaryrefslogtreecommitdiff
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-01-28 12:38:27 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-01-28 18:55:02 +0100
commit85538dd33b227cabb29e9dc630691a7edb6c3920 (patch)
tree63a63c0fbfb75728fa8ae197409821e8d1d2e9cd /vcl/source/control/button.cxx
parent1730d47aab69310687e2b3afb12f8b63102f9b88 (diff)
Modernize a bit vcl (part1)
by using for-range loops + remove useless vars + avoid some iterators calculus by using plain loop Change-Id: I94572bfd56ad9ac76c9899cf68d5ba831009fa7b Reviewed-on: https://gerrit.libreoffice.org/48777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 949cc65d5a9b..249f8be08aec 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2169,11 +2169,11 @@ void RadioButton::group(RadioButton &rOther)
{
std::vector< VclPtr<RadioButton> > aOthers(rOther.GetRadioButtonGroup(false));
//make all members of the group share the same button group
- for (auto aI = aOthers.begin(), aEnd = aOthers.end(); aI != aEnd; ++aI)
+ for (auto const& elem : aOthers)
{
- aFind = std::find(m_xGroup->begin(), m_xGroup->end(), *aI);
+ aFind = std::find(m_xGroup->begin(), m_xGroup->end(), elem);
if (aFind == m_xGroup->end())
- m_xGroup->push_back(*aI);
+ m_xGroup->push_back(elem);
}
}
@@ -2238,9 +2238,9 @@ void RadioButton::ImplUncheckAllOther()
std::vector<VclPtr<RadioButton> > aGroup(GetRadioButtonGroup(false));
// iterate over radio button group and checked buttons
- for (auto aI = aGroup.begin(), aEnd = aGroup.end(); aI != aEnd; ++aI)
+ for (auto const& elem : aGroup)
{
- VclPtr<RadioButton> pWindow = *aI;
+ VclPtr<RadioButton> pWindow = elem;
if ( pWindow->IsChecked() )
{
pWindow->SetState( false );