diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2016-10-11 13:01:01 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-10-18 22:13:24 +0000 |
commit | baeb3b43fb67192e8e8639e2d5dd21ccbf5178a4 (patch) | |
tree | e3a8ed3a58408ae5f6dbe3d3e4e160f101065e7d /opencl/source | |
parent | c01b15514e376c4981dd98c58fa69c848c47ce9a (diff) |
opencl: convert to C++11 for loop
Change-Id: Id96a3816eb7ef2241f5a6a57b164e1e366eb357a
Reviewed-on: https://gerrit.libreoffice.org/29693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'opencl/source')
-rw-r--r-- | opencl/source/openclwrapper.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 3daa019cf37a..c876133e1605 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -739,16 +739,14 @@ namespace { cl_device_id findDeviceIdByDeviceString(const OUString& rString, const std::vector<OpenCLPlatformInfo>& rPlatforms) { - std::vector<OpenCLPlatformInfo>::const_iterator it = rPlatforms.begin(), itEnd = rPlatforms.end(); - for(; it != itEnd; ++it) + for (const OpenCLPlatformInfo& rPlatform : rPlatforms) { - std::vector<OpenCLDeviceInfo>::const_iterator itr = it->maDevices.begin(), itrEnd = it->maDevices.end(); - for(; itr != itrEnd; ++itr) + for (const OpenCLDeviceInfo& rDeviceInfo : rPlatform.maDevices) { - OUString aDeviceId = it->maVendor + " " + itr->maName; - if(rString == aDeviceId) + OUString aDeviceId = rDeviceInfo.maVendor + " " + rDeviceInfo.maName; + if (rString == aDeviceId) { - return static_cast<cl_device_id>(itr->device); + return rDeviceInfo.device; } } } |