diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-05 10:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-05 12:44:25 +0000 |
commit | f07ff7ed8a23b4982ed9cd7d9e2083c9d0928384 (patch) | |
tree | 636c69f83d25d0bfe540322b24dcbe3779c6b9b7 /opencl/source | |
parent | 931a72efbc8708fab91e849b39a84e6b7939c7de (diff) |
clang-tidy modernize-loop-convert in oox to sax
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c
Reviewed-on: https://gerrit.libreoffice.org/24674
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'opencl/source')
-rw-r--r-- | opencl/source/openclwrapper.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 701317881a78..1655cb61c84c 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -71,9 +71,8 @@ OString generateMD5(const void* pData, size_t length) OStringBuffer aBuffer; const char* pString = "0123456789ABCDEF"; - for(size_t i = 0; i < RTL_DIGEST_LENGTH_MD5; ++i) + for(sal_uInt8 val : pBuffer) { - sal_uInt8 val = pBuffer[i]; aBuffer.append(pString[val/16]); aBuffer.append(pString[val%16]); } @@ -272,12 +271,12 @@ void releaseOpenCLEnv( GPUEnv *gpuInfo ) return; } - for (int i = 0; i < OPENCL_CMDQUEUE_SIZE; ++i) + for (_cl_command_queue* & i : gpuEnv.mpCmdQueue) { - if (gpuEnv.mpCmdQueue[i]) + if (i) { - clReleaseCommandQueue(gpuEnv.mpCmdQueue[i]); - gpuEnv.mpCmdQueue[i] = nullptr; + clReleaseCommandQueue(i); + i = nullptr; } } gpuEnv.mnCmdQueuePos = 0; |