diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-09-05 18:35:35 -0400 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-07 07:18:33 +0000 |
commit | 899c21ce5db0f4c3ad0bb6c9680e147f578b0894 (patch) | |
tree | f3b30afd828ee10df5205c57aaf69b0501bcace2 /dbaccess/source/ui/dlg/adminpages.cxx | |
parent | 3536eab550628ff4e07442066b7d1893519c03db (diff) |
dbaccess: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.
Change-Id: I82331f16cc1994dd9ef36eb80d67b64171cecc74
Reviewed-on: https://gerrit.libreoffice.org/18355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess/source/ui/dlg/adminpages.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 8e8b0f4a3080..82b68b3633e2 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -148,16 +148,25 @@ namespace dbaui if ( _bSaveValue ) { fillControls(aControlList); - ::std::for_each(aControlList.begin(),aControlList.end(),TSaveValueWrapperFunctor()); + for( const auto& pValueWrapper : aControlList ) + { + pValueWrapper->SaveValue(); + } } if ( bReadonly ) { fillWindows(aControlList); - ::std::for_each(aControlList.begin(),aControlList.end(),TDisableWrapperFunctor()); + for( const auto& pValueWrapper : aControlList ) + { + pValueWrapper->Disable(); + } } - ::std::for_each(aControlList.begin(),aControlList.end(),TDeleteWrapperFunctor()); + for( const auto& pValueWrapper : aControlList ) + { + delete pValueWrapper; + } aControlList.clear(); } |