diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 21:05:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 21:05:31 +0000 |
commit | 0fd7c40964db02749e1c07923580f7d2e7632edd (patch) | |
tree | 71fe13f098e565b6bd273d7f106584a67e06ad46 /sc | |
parent | b0e7cf4045bc8c819881e1728172d23c98bc1d95 (diff) |
coverity#1341778 Logically dead code
Change-Id: I83b167c44b1cb14681c2e5a3a27277f2bedd36c6
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index f2f8acf1aa7f..4cbddf3db929 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -331,20 +331,14 @@ bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool return false; } + bool bSuccess = ::opencl::switchOpenCLDevice(&rDeviceId, bAutoSelect, bForceEvaluation); - if(!bSuccess) + if (!bSuccess) return false; delete msInstance; - msInstance = nullptr; - - if (bOpenCLEnabled) - { - msInstance = new sc::opencl::FormulaGroupInterpreterOpenCL(); - return msInstance != nullptr; - } - - return false; + msInstance = new sc::opencl::FormulaGroupInterpreterOpenCL(); + return true; } void FormulaGroupInterpreter::getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int32& rPlatformId) |