Kaydet (Commit) baeb3b43 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

opencl: convert to C++11 for loop

Change-Id: Id96a3816eb7ef2241f5a6a57b164e1e366eb357a
Reviewed-on: https://gerrit.libreoffice.org/29693Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst c01b1551
......@@ -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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment