summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-10 14:39:07 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-11 06:54:34 +0000
commit265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch)
tree6936185b2f2f46b99646d00e542cdde845ef073d /stoc
parent9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff)
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5 Reviewed-on: https://gerrit.libreoffice.org/24847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/security/access_controller.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 13b5f3b92759..51094ed880dc 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -541,9 +541,8 @@ void AccessController::checkAndClearPostPoned()
case SINGLE_USER:
{
OSL_ASSERT( m_singleUser_init );
- for ( size_t nPos = 0; nPos < vec.size(); ++nPos )
+ for (const auto & p : vec)
{
- pair< OUString, Any > const & p = vec[ nPos ];
OSL_ASSERT( m_singleUserId.equals( p.first ) );
m_singleUserPermissions.checkPermission( p.second );
}
@@ -552,9 +551,8 @@ void AccessController::checkAndClearPostPoned()
case SINGLE_DEFAULT_USER:
{
OSL_ASSERT( m_defaultPerm_init );
- for ( size_t nPos = 0; nPos < vec.size(); ++nPos )
+ for (const auto & p : vec)
{
- pair< OUString, Any > const & p = vec[ nPos ];
OSL_ASSERT( p.first.isEmpty() ); // default-user
m_defaultPermissions.checkPermission( p.second );
}
@@ -562,9 +560,8 @@ void AccessController::checkAndClearPostPoned()
}
case ON:
{
- for ( size_t nPos = 0; nPos < vec.size(); ++nPos )
+ for (const auto & p : vec)
{
- pair< OUString, Any > const & p = vec[ nPos ];
PermissionCollection const * pPermissions;
// lookup policy for user
{