From 10ad9560fba562f494fa44fc8a7bd2388d9e8c5c Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 5 Oct 2021 20:49:26 +0200 Subject: drop 'using namespace std' in o* r* x* Change-Id: I15d56d133cf464a3cb6483be785b1259c7f35b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123120 Tested-by: Jenkins Reviewed-by: Julien Nabet --- opencl/opencltest/main.cxx | 10 ++++------ opencl/source/openclwrapper.cxx | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'opencl') diff --git a/opencl/opencltest/main.cxx b/opencl/opencltest/main.cxx index a499032f8c05..0db18b0042d1 100644 --- a/opencl/opencltest/main.cxx +++ b/opencl/opencltest/main.cxx @@ -18,8 +18,6 @@ #include -using namespace std; - // The purpose of this separate executable is to check whether OpenCL works // without crashing (asserting, etc.). Other checks can be done by LO core itself. @@ -44,7 +42,7 @@ static void runTest(const char* deviceName, const char* devicePlatform) // Find the given OpenCL device (in order to use the same one as LO core). cl_uint numPlatforms; openclcheck(clGetPlatformIDs(0, nullptr, &numPlatforms)); - vector platforms(numPlatforms); + std::vector platforms(numPlatforms); openclcheck(clGetPlatformIDs(numPlatforms, platforms.data(), nullptr)); cl_platform_id platformId = nullptr; for (cl_uint i = 0; i < numPlatforms; ++i) @@ -67,7 +65,7 @@ static void runTest(const char* deviceName, const char* devicePlatform) cl_uint numDevices; openclcheck(clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, 0, nullptr, &numDevices)); - vector devices(numDevices); + std::vector devices(numDevices); openclcheck( clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, numDevices, devices.data(), nullptr)); cl_device_id deviceId = nullptr; @@ -116,11 +114,11 @@ static void runTest(const char* deviceName, const char* devicePlatform) size_t length; status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, 0, nullptr, &length); - vector error(length + 1); + std::vector error(length + 1); status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, length, error.data(), nullptr); error[length] = '\0'; - cerr << "OpenCL driver check build error:" << error.data() << endl; + std::cerr << "OpenCL driver check build error:" << error.data() << std::endl; abort(); } #endif diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 6f4de39bfae7..f6d1242baa3d 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -56,8 +56,6 @@ if( status != CL_SUCCESS ) \ return false; \ } -using namespace std; - namespace { bool bIsInited = false; -- cgit