diff options
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/inc/opencl_device.hxx | 6 | ||||
-rw-r--r-- | opencl/source/opencl_device.cxx | 9 |
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) { |