diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-03 10:50:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-03 12:39:43 +0200 |
commit | 1511c73aa415c22dd890f2a8a3bc6d25dd646f8d (patch) | |
tree | 6685ca284bebd82dd878f3075d07b97cf6cc9221 /opencl | |
parent | af95bda66d4f114c5935a8ff4ca7ac0e6faec86a (diff) |
loplugin:flatten in opencl
Change-Id: I9f45510eddb022013af751d232d4704432717ef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/source/OpenCLZone.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/opencl/source/OpenCLZone.cxx b/opencl/source/OpenCLZone.cxx index 43ac31899c4d..01b50ed14a54 100644 --- a/opencl/source/OpenCLZone.cxx +++ b/opencl/source/OpenCLZone.cxx @@ -25,21 +25,21 @@ void OpenCLZone::hardDisable() { // protect ourselves from double calling etc. static bool bDisabled = false; - if (!bDisabled) - { - bDisabled = true; + if (bDisabled) + return; - std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); - officecfg::Office::Common::Misc::UseOpenCL::set(false, xChanges); - xChanges->commit(); + bDisabled = true; - // Force synchronous config write - auto xConfProvider = css::configuration::theDefaultProvider::get(comphelper::getProcessComponentContext()); - css::uno::Reference<css::util::XFlushable> xFlushable(xConfProvider, css::uno::UNO_QUERY_THROW); - xFlushable->flush(); + std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Misc::UseOpenCL::set(false, xChanges); + xChanges->commit(); - releaseOpenCLEnv(&openclwrapper::gpuEnv); - } + // Force synchronous config write + auto xConfProvider = css::configuration::theDefaultProvider::get(comphelper::getProcessComponentContext()); + css::uno::Reference<css::util::XFlushable> xFlushable(xConfProvider, css::uno::UNO_QUERY_THROW); + xFlushable->flush(); + + releaseOpenCLEnv(&openclwrapper::gpuEnv); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |