summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2022-07-04 21:02:16 +0100
committerMichael Meeks <michael.meeks@collabora.com>2022-07-06 10:29:45 +0200
commit4140154fe76ab627ad142ecb9db62d304eae146c (patch)
treeec730330e9cacba6105ca0ad8711d6b80e1d2d67 /opencl
parente4066a41406b1ddd454901b4fa718cf9be2746c4 (diff)
opencl: no need for unhelpful nullptr OUString * case.
Change-Id: I0b3cad2247706901e1a6b9c3df7fbbc9f23ff987 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136816 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/source/openclwrapper.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index f6d1242baa3d..dd1850976c08 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -760,14 +760,12 @@ bool canUseOpenCL()
return !getenv("SAL_DISABLE_OPENCL") && officecfg::Office::Common::Misc::UseOpenCL::get();
}
-bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString)
+bool switchOpenCLDevice(std::u16string_view aDevice, bool bAutoSelect, bool bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString)
{
if (!canUseOpenCL() || fillOpenCLInfo().empty())
return false;
- cl_device_id pDeviceId = nullptr;
- if(pDevice)
- pDeviceId = findDeviceIdByDeviceString(*pDevice, fillOpenCLInfo());
+ cl_device_id pDeviceId = findDeviceIdByDeviceString(aDevice, fillOpenCLInfo());
if(!pDeviceId || bAutoSelect)
{