summaryrefslogtreecommitdiff
path: root/opencl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-22 13:44:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-22 13:44:38 +0200
commit92f10ad9bcc9b24401a730175ae5a5252b803b06 (patch)
tree49e23b68a28c999421d7c4c7b140632a679e024f /opencl/source
parent334e2dc9c3da4519e31e0452a40d3a958c401876 (diff)
Various loplugin warnings in opencl/
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
Diffstat (limited to 'opencl/source')
-rw-r--r--opencl/source/opencl_device.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index af3bc1844e3a..907d551b8a69 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -381,7 +381,8 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
rBestDeviceIndex = -1;
- for (unsigned int d = 0; d < profile->devices.size(); d++)
+ for (std::vector<ds_device>::size_type d = 0; d < profile->devices.size();
+ d++)
{
ds_device& device = profile->devices[d];
@@ -410,7 +411,8 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
}
double fScore = DBL_MAX;
- if (device.fTime >= 0.0 || device.fTime == DBL_MAX)
+ if (device.fTime >= 0.0
+ || rtl::math::approxEqual(device.fTime, DBL_MAX))
{
fScore = device.fTime;
}
@@ -481,11 +483,6 @@ public:
maStream.WriteChar('\n');
}
- void log(const OString& rKey, const OUString& rValue)
- {
- log(rKey, OUStringToOString(rValue, RTL_TEXTENCODING_UTF8));
- }
-
void log(const OString& rKey, int rValue)
{
log(rKey, OString::number(rValue));
@@ -536,7 +533,8 @@ void writeDevicesLog(std::unique_ptr<ds_profile>& rProfile, OUString sProfilePat
} // end anonymous namespace
-ds_device getDeviceSelection(OUString sProfilePath, bool bForceSelection)
+ds_device getDeviceSelection(
+ OUString const & sProfilePath, bool bForceSelection)
{
/* Run only if device is not yet selected */
if (!bIsDeviceSelected || bForceSelection)
@@ -554,7 +552,7 @@ ds_device getDeviceSelection(OUString sProfilePath, bool bForceSelection)
}
/* Try reading scores from file */
- OUString sFilePath = sProfilePath + OUString("opencl_profile.xml");
+ OUString sFilePath = sProfilePath + "opencl_profile.xml";
if (!bForceSelection)
{