diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:19:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:19:00 +0100 |
commit | d1a510c9bde5eb9ca8ec1aa3e81782b0615fc95b (patch) | |
tree | ef37ad8bc4aa4cc10fb63067eaf615c3533b0b28 /opencl | |
parent | 359dce126050e2d976593c0671db4311548f674d (diff) |
More loplugin:cstylecast: opencl
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Id28f5699a4a9c0078a1326e81e833b75951f97cc
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/inc/opencl_device_selection.h | 4 | ||||
-rw-r--r-- | opencl/source/opencl_device.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h index 5ebc87a9410c..8849cd59abbc 100644 --- a/opencl/inc/opencl_device_selection.h +++ b/opencl/inc/opencl_device_selection.h @@ -158,7 +158,7 @@ inline ds_status initDSProfile(std::unique_ptr<ds_profile>& rProfile, OString co } numDevices = 0; - for (i = 0; i < (unsigned int)numPlatforms; i++) + for (i = 0; i < static_cast<unsigned int>(numPlatforms); i++) { cl_uint num = 0; cl_int err = clGetDeviceIDs(platforms[i], CL_DEVICE_TYPE_ALL, 0, nullptr, &num); @@ -182,7 +182,7 @@ inline ds_status initDSProfile(std::unique_ptr<ds_profile>& rProfile, OString co rProfile->devices.resize(numDevices + 1); // +1 to numDevices to include the native CPU next = 0; - for (i = 0; i < (unsigned int)numPlatforms; i++) + for (i = 0; i < static_cast<unsigned int>(numPlatforms); i++) { cl_uint num = 0; unsigned j; diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index 57c56ca3cf58..f803076c97b4 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -302,7 +302,7 @@ ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptr<LibreOffice rDevice.fTime = tools::Time::GetMonotonicTicks() - kernelTime; // Scale time to how long it would have taken to go all the way to outputSize - rDevice.fTime /= ((double) j / testData->outputSize); + rDevice.fTime /= (static_cast<double>(j) / testData->outputSize); // InterpretTail - the S/W fallback is nothing like as efficient // as any good openCL implementation: no SIMD, tons of branching |