diff options
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/source/openclconfig.cxx | 8 | ||||
-rw-r--r-- | opencl/source/openclwrapper.cxx | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx index eaa0bba5e06c..b81ffed22937 100644 --- a/opencl/source/openclconfig.cxx +++ b/opencl/source/openclconfig.cxx @@ -38,8 +38,7 @@ bool OpenCLConfig::operator== (const OpenCLConfig& r) const { return (mbUseOpenCL == r.mbUseOpenCL && maBlackList == r.maBlackList && - maWhiteList == r.maWhiteList && - true); + maWhiteList == r.maWhiteList); } bool OpenCLConfig::operator!= (const OpenCLConfig& r) const @@ -122,10 +121,7 @@ bool match(const OUString& rPattern, const OUString& rInput) icu::UnicodeString sIcuInput(reinterpret_cast<const UChar*>(rInput.getStr()), rInput.getLength()); RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError); - if (U_SUCCESS(nIcuError) && aMatcher.matches(nIcuError) && U_SUCCESS(nIcuError)) - return true; - - return false; + return U_SUCCESS(nIcuError) && aMatcher.matches(nIcuError) && U_SUCCESS(nIcuError); } bool match(const OpenCLConfig::ImplMatcher& rListEntry, const OpenCLPlatformInfo& rPlatform, const OpenCLDeviceInfo& rDevice) diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 796289362472..8660dd744816 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -791,9 +791,7 @@ void findDeviceInfoFromDeviceId(cl_device_id aDeviceId, size_t& rDeviceId, size_ bool canUseOpenCL() { - if (getenv("SAL_DISABLE_OPENCL") || !officecfg::Office::Common::Misc::UseOpenCL::get()) - return false; - return true; + return !getenv("SAL_DISABLE_OPENCL") || !officecfg::Office::Common::Misc::UseOpenCL::get(); } bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEvaluation, OUString& rOutSelectedDeviceVersionIDString) |