summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-20 14:55:37 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-20 14:58:32 +0200
commit92c5e9b2812571329a758d54b15273f5fc68f95c (patch)
treea95d39d956e59b8cd2e9b11c8d72107c0c1349a2 /sc/inc
parenta55f740045d6d30e1ef5522889d2dc359ca5784a (diff)
Use regexps in the OpenCL blacklist/whitelist
Drop version number bounds, use regexps instead. Not entirely ideal, but as vendors are free to put arbitrary stuff into the driver version string (part of which might be numbers, part free text, part significant, part just informative), just comparing against lower and upper bounds with strverscmp() was not ideal either. Change-Id: Ic4ef4d8e15f79f1c96e6e03f6c01e62ae92dc2fc
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/calcconfig.hxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx
index 40a33b6bcd7b..2b93fa3bb171 100644
--- a/sc/inc/calcconfig.hxx
+++ b/sc/inc/calcconfig.hxx
@@ -47,8 +47,7 @@ struct SC_DLLPUBLIC ScCalcConfig
OUString maOSVersion;
OUString maPlatformVendor;
OUString maDevice;
- OUString maDriverVersionMin;
- OUString maDriverVersionMax;
+ OUString maDriverVersion;
OpenCLImplMatcher()
{
@@ -58,14 +57,12 @@ struct SC_DLLPUBLIC ScCalcConfig
const OUString& rOSVersion,
const OUString& rPlatformVendor,
const OUString& rDevice,
- const OUString& rDriverVersionMin,
- const OUString& rDriverVersionMax)
+ const OUString& rDriverVersion)
: maOS(rOS),
maOSVersion(rOSVersion),
maPlatformVendor(rPlatformVendor),
maDevice(rDevice),
- maDriverVersionMin(rDriverVersionMin),
- maDriverVersionMax(rDriverVersionMax)
+ maDriverVersion(rDriverVersion)
{
}
@@ -75,8 +72,7 @@ struct SC_DLLPUBLIC ScCalcConfig
maOSVersion == r.maOSVersion &&
maPlatformVendor == r.maPlatformVendor &&
maDevice == r.maDevice &&
- maDriverVersionMin == r.maDriverVersionMin &&
- maDriverVersionMax == r.maDriverVersionMax;
+ maDriverVersion == r.maDriverVersion;
}
bool operator!=(const OpenCLImplMatcher& r) const
{
@@ -92,9 +88,7 @@ struct SC_DLLPUBLIC ScCalcConfig
(maPlatformVendor == r.maPlatformVendor &&
(maDevice < r.maDevice ||
(maDevice == r.maDevice &&
- (maDriverVersionMin < r.maDriverVersionMin ||
- (maDriverVersionMin == r.maDriverVersionMin &&
- maDriverVersionMax < r.maDriverVersionMax))))))))));
+ (maDriverVersion < r.maDriverVersion)))))))));
}
};