diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-14 11:14:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-16 09:04:51 +0200 |
commit | 7d7a7862a7dccb6764f80258f28685a0da3cbbcb (patch) | |
tree | b7281950f84b12c4868542f103a23c1460d22863 /xmlsecurity/source/dialogs | |
parent | abeab40aeb2bf16c1438b5e5f0cd70b3e11f6b7a (diff) |
new loplugin:sequenceloop
look for places we should be using std::as_const on for-range
loops over uno::Sequence, to avoid triggering a copy
Change-Id: I7efb641bf09d37c87946f03428ee4eec90298c8a
Reviewed-on: https://gerrit.libreoffice.org/77441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r-- | xmlsecurity/source/dialogs/certificatechooser.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/macrosecurity.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index ec499bc159b0..32c688f2a257 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -198,7 +198,7 @@ void CertificateChooser::ImplInitialize() // fill list of certificates; the first entry will be selected - for ( const auto& xCert : xCerts ) + for ( const auto& xCert : std::as_const(xCerts) ) { std::shared_ptr<UserData> userData = std::make_shared<UserData>(); userData->xCertificate = xCert; diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 04f8f0f9dd86..4e0dcc76e2fb 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -357,7 +357,7 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(weld::Container* pP FillCertLB(); - css::uno::Sequence< OUString > aSecureURLs = m_pDlg->m_aSecOptions.GetSecureURLs(); + const css::uno::Sequence< OUString > aSecureURLs = m_pDlg->m_aSecOptions.GetSecureURLs(); mbURLsReadonly = m_pDlg->m_aSecOptions.IsReadOnly( SvtSecurityOptions::EOption::SecureUrls ); m_xTrustFileROFI->set_visible(mbURLsReadonly); m_xTrustFileLocLB->set_sensitive(!mbURLsReadonly); |