summaryrefslogtreecommitdiff
path: root/extensions/source/update
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-02-20 01:10:07 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-20 07:17:38 +0100
commit6a143985bdc5d12d1f9e8cf8592440282986c099 (patch)
tree346e09d6ba1146b52a6a484a2883f3e898184648 /extensions/source/update
parentd707a5e64ba53ddb7669cca725915527aa788a6b (diff)
Simplify containers iterations in desktop, dtrans, editeng, extensions
Use range-based loop or replace with STL functions Change-Id: Ic5389d123d0a6a32a8bb46b081165e94a7c55292 Reviewed-on: https://gerrit.libreoffice.org/68036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/update')
-rw-r--r--extensions/source/update/check/updatecheck.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index dd07258df128..47ef6e18093e 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1225,14 +1225,8 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
OSL_ASSERT(DISABLED == m_eState || CHECK_SCHEDULED == m_eState);
// Ignore leading non direct download if we get direct ones
- std::vector< DownloadSource >::iterator iter = m_aUpdateInfo.Sources.begin();
- while( iter != m_aUpdateInfo.Sources.end() )
- {
- if( iter->IsDirect )
- break;
-
- ++iter;
- }
+ std::vector< DownloadSource >::iterator iter = std::find_if(m_aUpdateInfo.Sources.begin(), m_aUpdateInfo.Sources.end(),
+ [](const DownloadSource& rSource) { return rSource.IsDirect; });
if( (iter != m_aUpdateInfo.Sources.begin()) &&
(iter != m_aUpdateInfo.Sources.end()) &&