From e669f70613ab1cad02e886aacc7a8d5df2550391 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 17 Jul 2017 11:35:21 +0200 Subject: loplugin:constparams in i18npool,opencl,svl Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818 Reviewed-on: https://gerrit.libreoffice.org/40051 Tested-by: Jenkins Reviewed-by: Noel Grandin --- opencl/inc/opencl_device_selection.h | 4 ++-- opencl/source/opencl_device.cxx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'opencl') diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h index 79f88894c378..761a79647faa 100644 --- a/opencl/inc/opencl_device_selection.h +++ b/opencl/inc/opencl_device_selection.h @@ -401,7 +401,7 @@ public: } }; -inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr& pProfile) +inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr const & pProfile) { if (pProfile == nullptr) return DS_INVALID_PROFILE; @@ -470,7 +470,7 @@ inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr& pProfile) +inline ds_status readProfile(const OUString& rStreamName, std::unique_ptr const & pProfile) { ds_status eStatus = DS_SUCCESS; diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index dae0551f2e44..62f77c27f1b9 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -149,7 +149,7 @@ void timerStart(timer* mytimer) } /* Timer functions - get current value */ -double timerCurrent(timer* mytimer) +double timerCurrent(timer const * mytimer) { #ifdef _WIN32 LARGE_INTEGER stop, frequency; @@ -181,7 +181,7 @@ double random(double min, double max) } /* Populate input */ -void populateInput(std::unique_ptr& testData) +void populateInput(std::unique_ptr const & testData) { double* input0 = &testData->input0[0]; double* input1 = &testData->input1[0]; @@ -197,7 +197,7 @@ void populateInput(std::unique_ptr& testData) } /* Evaluate devices */ -ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptr& testData) +ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptr const & testData) { if (rDevice.eType == DeviceType::OpenCLDevice) { @@ -377,7 +377,7 @@ ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptr& pProfile, std::unique_ptr& pTestData) +ds_status profileDevices(std::unique_ptr const & pProfile, std::unique_ptr const & pTestData) { ds_status status = DS_SUCCESS; @@ -397,7 +397,7 @@ ds_status profileDevices(std::unique_ptr& pProfile, std::unique_ptr< } /* Pick best device */ -ds_status pickBestDevice(std::unique_ptr& profile, int& rBestDeviceIndex) +ds_status pickBestDevice(std::unique_ptr const & profile, int& rBestDeviceIndex) { double bestScore = DBL_MAX; @@ -469,7 +469,7 @@ ds_status pickBestDevice(std::unique_ptr& profile, int& rBestDeviceI } /* Return device ID for matching device name */ -int matchDevice(std::unique_ptr& profile, char* deviceName) +int matchDevice(std::unique_ptr const & profile, char* deviceName) { int deviceMatch = -1; for (unsigned int d = 0; d < profile->devices.size() - 1; d++) @@ -517,7 +517,7 @@ public: }; -void writeDevicesLog(std::unique_ptr& rProfile, OUString const & sProfilePath, int nSelectedIndex) +void writeDevicesLog(std::unique_ptr const & rProfile, OUString const & sProfilePath, int nSelectedIndex) { OUString aCacheFile(sProfilePath + "opencl_devices.log"); LogWriter aWriter(aCacheFile); -- cgit v1.2.3