From f07ff7ed8a23b4982ed9cd7d9e2083c9d0928384 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 May 2016 10:10:54 +0200 Subject: clang-tidy modernize-loop-convert in oox to sax Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- opencl/source/openclwrapper.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'opencl') 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; -- cgit