diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-24 09:24:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-24 11:31:02 +0200 |
commit | 63df0796f5ec500f3b6fb34510d4bc79c009e76d (patch) | |
tree | 1abacb83b15612c8ef712c89eb3dc15f28bc41c4 /opencl | |
parent | 1c8f03b48a02a56bc4eb364d8a4e9bd4715a530a (diff) |
clang-tidy readability-simplify-boolean-expr in oox..sal
Change-Id: I1e14e5b15d2dd9e35477f8189cbecf0b443b9381
Reviewed-on: https://gerrit.libreoffice.org/36875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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) |