opencl/source/openclwrapper.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit baeb3b43fb67192e8e8639e2d5dd21ccbf5178a4 Author: Tomaž Vajngerl <[email protected]> Date: Tue Oct 11 13:01:01 2016 +0200 opencl: convert to C++11 for loop Change-Id: Id96a3816eb7ef2241f5a6a57b164e1e366eb357a Reviewed-on: https://gerrit.libreoffice.org/29693 Tested-by: Jenkins <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 3daa019..c876133 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; } } }
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
