summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /opencl
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'opencl')
-rw-r--r--opencl/inc/opencl_device.hxx6
-rw-r--r--opencl/source/opencl_device.cxx9
2 files changed, 10 insertions, 5 deletions
diff --git a/opencl/inc/opencl_device.hxx b/opencl/inc/opencl_device.hxx
index 69a9cbbc9c1a..036a06fb2736 100644
--- a/opencl/inc/opencl_device.hxx
+++ b/opencl/inc/opencl_device.hxx
@@ -10,6 +10,10 @@
#ifndef INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
#define INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <rtl/ustring.hxx>
namespace openclwrapper
@@ -18,7 +22,7 @@ struct GPUEnv;
}
struct ds_device;
-ds_device const& getDeviceSelection(OUString const& pFileName, bool bForceSelection);
+ds_device const& getDeviceSelection(std::u16string_view pFileName, bool bForceSelection);
void releaseOpenCLEnv(openclwrapper::GPUEnv* gpuInfo);
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 682b92d0eb47..a5b249182a3d 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -10,6 +10,7 @@
#include <float.h>
#include <iostream>
#include <memory>
+#include <string_view>
#include <vector>
#include <algorithm>
@@ -454,9 +455,9 @@ public:
};
-void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, OUString const & sProfilePath, int nSelectedIndex)
+void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, std::u16string_view sProfilePath, int nSelectedIndex)
{
- OUString aCacheFile(sProfilePath + "opencl_devices.log");
+ OUString aCacheFile(OUString::Concat(sProfilePath) + "opencl_devices.log");
LogWriter aWriter(aCacheFile);
int nIndex = 0;
@@ -493,7 +494,7 @@ void writeDevicesLog(std::unique_ptr<ds_profile> const & rProfile, OUString cons
} // end anonymous namespace
ds_device const & getDeviceSelection(
- OUString const & sProfilePath, bool bForceSelection)
+ std::u16string_view sProfilePath, bool bForceSelection)
{
/* Run only if device is not yet selected */
if (!bIsDeviceSelected || bForceSelection)
@@ -511,7 +512,7 @@ ds_device const & getDeviceSelection(
}
/* Try reading scores from file */
- OUString sFilePath = sProfilePath + "opencl_profile.xml";
+ OUString sFilePath = OUString::Concat(sProfilePath) + "opencl_profile.xml";
if (!bForceSelection)
{