summaryrefslogtreecommitdiff
path: root/opencl/source
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-02-15 00:08:43 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 12:21:28 +0100
commit9d7620613d3ea2feb45a7ff57c4d2544bb1c6fe6 (patch)
tree20e56cfbe9a0bc07974fb14861556da74f3ecddc /opencl/source
parent177747c44557489760cc00473daecacd99995427 (diff)
Simplify containers iterations in oox, opencl, package
Use range-based loop or replace with STL functions Change-Id: I91405920d91383bc6cf13b9497d262b1f6f0a84d Reviewed-on: https://gerrit.libreoffice.org/67848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'opencl/source')
-rw-r--r--opencl/source/openclconfig.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index cf067de5aac3..6fcd59618789 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -58,14 +58,14 @@ css::uno::Sequence<OUString> SetOfImplMatcherToStringSequence(const OpenCLConfig
css::uno::Sequence<OUString> result(rSet.size());
size_t n(0);
- for (auto i = rSet.cbegin(); i != rSet.cend(); ++i)
+ for (const auto& rItem : rSet)
{
result[n++] =
- (*i).maOS.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
- (*i).maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
- (*i).maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
- (*i).maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
- (*i).maDriverVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
+ rItem.maOS.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
+ rItem.maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
+ rItem.maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
+ rItem.maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
+ rItem.maDriverVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
}
return result;
@@ -100,15 +100,15 @@ OpenCLConfig::ImplMatcherSet StringSequenceToSetOfImplMatcher(const css::uno::Se
{
OpenCLConfig::ImplMatcherSet result;
- for (auto i = rSequence.begin(); i != rSequence.end(); ++i)
+ for (const auto& rItem : rSequence)
{
OpenCLConfig::ImplMatcher m;
sal_Int32 index(0);
- m.maOS = getToken(*i, index);
- m.maOSVersion = getToken(*i, index);
- m.maPlatformVendor = getToken(*i, index);
- m.maDevice = getToken(*i, index);
- m.maDriverVersion = getToken(*i, index);
+ m.maOS = getToken(rItem, index);
+ m.maOSVersion = getToken(rItem, index);
+ m.maPlatformVendor = getToken(rItem, index);
+ m.maDevice = getToken(rItem, index);
+ m.maDriverVersion = getToken(rItem, index);
result.insert(m);
}
@@ -158,12 +158,12 @@ bool match(const OpenCLConfig::ImplMatcher& rListEntry, const OpenCLPlatformInfo
bool match(const OpenCLConfig::ImplMatcherSet& rList, const OpenCLPlatformInfo& rPlatform, const OpenCLDeviceInfo& rDevice, const char* sKindOfList)
{
- for (auto i = rList.cbegin(); i != rList.end(); ++i)
+ for (const auto& rListEntry : rList)
{
SAL_INFO("opencl", "Looking for match for platform=" << rPlatform << ", device=" << rDevice <<
- " in " << sKindOfList << " entry=" << *i);
+ " in " << sKindOfList << " entry=" << rListEntry);
- if (match(*i, rPlatform, rDevice))
+ if (match(rListEntry, rPlatform, rDevice))
{
SAL_INFO("opencl", "Match!");
return true;